luvsound / astrid

Astrid for pippi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__

hecanjog opened this issue · comments

Seeing this odd warning when running tests:

ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__ return f(*args, **kwds)

More info when running with PYTHONWARNINGS='error::ImportWarning' make test (via discussion here) suggests a potential issue with a msgpack cython module:

test_orc (unittest.loader._FailedTest) ... ERROR

======================================================================
ERROR: test_orc (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_orc
Traceback (most recent call last):
  File "/usr/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/home/hecanjog/code/astrid/tests/test_orc.py", line 3, in <module>
    from astrid import orc
  File "/home/hecanjog/code/astrid/astrid/orc.py", line 10, in <module>
    import msgpack
  File "/home/hecanjog/code/astrid/venv/lib/python3.6/site-packages/msgpack/__init__.py", line 25, in <module>
    from msgpack._packer import Packer
  File "msgpack/_packer.pyx", line 9, in init msgpack._packer (msgpack/_packer.cpp:5208)
ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__


----------------------------------------------------------------------
Ran 1 test in 0.000s

FAILED (errors=1)
make: *** [Makefile:2: test] Error 1

Open cython ticket: cython/cython#1715