Re: [pylons-discuss] Python 3.8 and __init__.py in views directory

2020-03-25 Thread Sydo Luciani
Sorry, no , after deleting __pycache__ and reinstalling app using pip 
install -e .
it worked with Python 3.5 but not with python 3.8.

p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Probably not important since recreating __init__.py fixes the problem
but apparently something has changed since Python 3.6.



On Wednesday, 25 March 2020 14:23:06 UTC-5, Jonathan Vanasco wrote:
>
>
> Stuff like this often happens because Python has a compiled/cached 
> version. Under Python2,  `.pyc` files were in the same directory as the 
> `.py` file ; under Python3 they are in a `__pycache__` directory and 
> versioned to the interpreter.
>
> you probably had a `views/__pycache__/__init__.cpython-35.pyc` file, which 
> python 3.5 picked up but 3.7 and 3.8 will not.
>
>
> On Wednesday, March 25, 2020 at 2:06:26 PM UTC-4, Sydo Luciani wrote:
>>
>> Yes, I was missing __init__.py in views folder, but didn't have any 
>> problem while working in Python 3.5 environment,
>> error started when switched to Python 3.7 and Python 3.8, and creating 
>> __init__ fixed the issue.
>>
>> The different behavior brought up curiosity.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/0b502dc9-2139-4e2b-b28d-ea24e0ddfaa3%40googlegroups.com.


Re: [pylons-discuss] Python 3.8 and __init__.py in views directory

2020-03-25 Thread Jonathan Vanasco

Stuff like this often happens because Python has a compiled/cached version. 
Under Python2,  `.pyc` files were in the same directory as the `.py` file ; 
under Python3 they are in a `__pycache__` directory and versioned to the 
interpreter.

you probably had a `views/__pycache__/__init__.cpython-35.pyc` file, which 
python 3.5 picked up but 3.7 and 3.8 will not.


On Wednesday, March 25, 2020 at 2:06:26 PM UTC-4, Sydo Luciani wrote:
>
> Yes, I was missing __init__.py in views folder, but didn't have any 
> problem while working in Python 3.5 environment,
> error started when switched to Python 3.7 and Python 3.8, and creating 
> __init__ fixed the issue.
>
> The different behavior brought up curiosity.
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/25856fcc-e569-4fe7-a138-6f3bb9917849%40googlegroups.com.


Re: [pylons-discuss] Python 3.8 and __init__.py in views directory

2020-03-25 Thread Sydo Luciani
Yes, I was missing __init__.py in views folder, but didn't have any problem
while working in Python 3.5 environment,
error started when switched to Python 3.7 and Python 3.8, and creating
__init__ fixed the issue.

The different behavior brought up curiosity.




On Wed, 25 Mar 2020 at 10:28, Michael Merickel  wrote:

> Sorry can you give more context? Did you delete the __init__.py in your
> views folder? If so, I would expect some issues.
>
> On Mar 24, 2020, at 22:12, Sydo Luciani  wrote:
>
> No problem with python 3.5 environment, but missing views/__init__.py,
> throws below errors in Python 3.8.
>
> Even including relative path to view module in
> config.scan('.module_name/views/view_module') has no effect.
>
> Error starts with:
> pyramid.httpexceptions.HTTPNotFound: The resource could not be found.
> During handling of the above exception, another exception occurred:
>
> And trace ends with:
>   File "/usr/lib/python3.8/posixpath.py", line 152, in dirname
> p = os.fspath(p)
>
>
> Is it by design ?
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pylons-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pylons-discuss/7edc8353-96b9-4bcc-85eb-372f049e6934%40googlegroups.com
> 
> .
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pylons-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pylons-discuss/1E9C3387-2E70-4C4A-8AD7-F47905B31D6C%40gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/CAJspodiZ1AbR5bCDpypwjw0H2pZ-6XcAEtbP%3DLO8pducqBk65g%40mail.gmail.com.


Re: [pylons-discuss] Python 3.8 and __init__.py in views directory

2020-03-25 Thread Michael Merickel
Sorry can you give more context? Did you delete the __init__.py in your views 
folder? If so, I would expect some issues.

> On Mar 24, 2020, at 22:12, Sydo Luciani  wrote:
> 
> No problem with python 3.5 environment, but missing views/__init__.py, throws 
> below errors in Python 3.8.
> 
> Even including relative path to view module in 
> config.scan('.module_name/views/view_module') has no effect.
> 
> Error starts with:
> pyramid.httpexceptions.HTTPNotFound: The resource could not be found.
> During handling of the above exception, another exception occurred:
> 
> And trace ends with:
>   File "/usr/lib/python3.8/posixpath.py", line 152, in dirname
> p = os.fspath(p)
> 
> 
> Is it by design ?
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to pylons-discuss+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pylons-discuss/7edc8353-96b9-4bcc-85eb-372f049e6934%40googlegroups.com
>  
> .

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/1E9C3387-2E70-4C4A-8AD7-F47905B31D6C%40gmail.com.


[pylons-discuss] Python 3.8 and __init__.py in views directory

2020-03-24 Thread Sydo Luciani
No problem with python 3.5 environment, but missing views/__init__.py, 
throws below errors in Python 3.8.

Even including relative path to view module in 
config.scan('.module_name/views/view_module') has no effect.

Error starts with:
pyramid.httpexceptions.HTTPNotFound: The resource could not be found.
During handling of the above exception, another exception occurred:

And trace ends with:
  File "/usr/lib/python3.8/posixpath.py", line 152, in dirname
p = os.fspath(p)


Is it by design ?

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/7edc8353-96b9-4bcc-85eb-372f049e6934%40googlegroups.com.