Installing django from package, addig dist-packages or site-packages, or just simply downloading it separately and adding the folder it resides in to the PYTHONPATH doesn't help.
I suppose it's a regression…a really nasty one.
Pointers on how to fix it ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you paste the pythonpath you're using and the place where the package is installed (to get the pythonpath, make a run and do import sys; print '\n'.join(sys.path).
Cheers,
Fabio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What seems to be the problem for me is 'file: /' there is a space and I think it is causing the error.
I started to have this error since I updated PyDev.
Any suggestions?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just took a look at the print and the space there is expected (so, that's not it).
Can you double check if you really have a QafTemplate in the Dionysus.DialogueManager.QAF module?
Another thing, if you make a regular run of that module (/home/eugen/Work/Helios-Python/workspace/Dionysus/test/main/test_qaf.py) does it work? (note that you need to have a "unittest.main()" for it to properly run your tests in that case).
If it doesn't, then it's a problem in your code (not really in pydev), now, if it does, can you paste the pythonpath you're using? (to get the pythonpath, make a run and do import sys; print '\n'.join(sys.path).
Cheers,
Fabio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After 2 days of head-slamming on the table I have discovered an import loop in my code.
I have come to conclusion that Python does not handle cyclic imports.
The error "ImportError: cannot import name" is really annoying since it is not clear where to look for the problem, or at least there should be somewhere a list of TODO's when that error occur, to find the reason for the exception.
Thank you fabioz for your nicely crafted response.
Sincerely Eugen
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I continue to get an "unresolved import error" from PyDev even though the module imports.
gives me the error even though I have added the site-package to both the PYTHONPATH and the project preferences.
I am running the latest version of both Eclipse and PyDev
Any ideas how to solve this ?
Installing django from package, addig dist-packages or site-packages, or just simply downloading it separately and adding the folder it resides in to the PYTHONPATH doesn't help.
I suppose it's a regression…a really nasty one.
Pointers on how to fix it ?
Can you paste the pythonpath you're using and the place where the package is installed (to get the pythonpath, make a run and do import sys; print '\n'.join(sys.path).
Cheers,
Fabio
Hello Guys,
I have slightly different one:
What seems to be the problem for me is 'file: /' there is a space and I think it is causing the error.
I started to have this error since I updated PyDev.
Any suggestions?
I just took a look at the print and the space there is expected (so, that's not it).
Can you double check if you really have a QafTemplate in the Dionysus.DialogueManager.QAF module?
Another thing, if you make a regular run of that module (/home/eugen/Work/Helios-Python/workspace/Dionysus/test/main/test_qaf.py) does it work? (note that you need to have a "unittest.main()" for it to properly run your tests in that case).
If it doesn't, then it's a problem in your code (not really in pydev), now, if it does, can you paste the pythonpath you're using? (to get the pythonpath, make a run and do import sys; print '\n'.join(sys.path).
Cheers,
Fabio
After 2 days of head-slamming on the table I have discovered an import loop in my code.
I have come to conclusion that Python does not handle cyclic imports.
The error "ImportError: cannot import name" is really annoying since it is not clear where to look for the problem, or at least there should be somewhere a list of TODO's when that error occur, to find the reason for the exception.
Thank you fabioz for your nicely crafted response.
Sincerely Eugen