Misleading import error
Issue
With current 3.8 rc2, or latest nightly, create a directory somedir
. Then issue
from somedir import something
this results in a pretty cryptic traceback
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: expected str, got NoneType object
Because it raises a TypeError, rather than an ImportError, this actually breaks some libraries with optional dependencies (for example gevent
).
Expected behaviour
The cpython 3.8 error message is:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'something' from 'somedir' (unknown location)
In pypy3.7 we used to get something slightly different, but equally helpful:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'something'
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information