ckan / ckanext-qa

CKAN QA Extension
MIT License
26 stars 52 forks source link

ImportError: cannot import name __version__ #57

Open KrzysztofMadejski opened 7 years ago

KrzysztofMadejski commented 7 years ago

Got this on another server while installing QA. No idea why this happens or how to debug it :/.

There is an __init__.py file with version specified.

(ckan) ckan@host:~/src/ckanext-qa$ python setup.py develop
Traceback (most recent call last):
  File "setup.py", line 2, in <module>
    from ckanext.qa import __version__
ImportError: cannot import name __version__
MrkGrgsn commented 7 years ago

I've found the same thing on Amazon linux. It appears to be related to namespace packages. If I do a pip uninstall ckanext-qa and then remove virtualenv/lib/python2.7/site-packages/ckanext-qa-nspkg.pth I can then run python setup.py develop again.

More importantly I am working from an older version of ckanext-qa and I note that in 37f02904b1a27cb6647f1344321a4ad831ea299c ckanext.qa is no longer a namespace package and this should resolve the issue.

KrzysztofMadejski commented 7 years ago

Maybe that causes the issue - I have that commit merged.