0

I'm unable to run my code in Eclipse pyDev. I get these red stars on my 'src' project folder as you can see in this screenshot.

And here is the error output when I import the project:

ImportError: No module named framework.api_driver.driver

Any idea why? I've already set up my path variable to point to C:\python27 and also added another PYTHON var to point to C:\Python27\Lib\site-packages even though the site-packages dir is empty.

Can anyone help?!

kbtz
  • 11,743
  • 6
  • 47
  • 68
Pelican
  • 333
  • 1
  • 2
  • 7

1 Answers1

0
import sys
sys.path.append(r"path to notematic_test") 

The import should now work.

M4rtini
  • 11,714
  • 3
  • 31
  • 41
  • Sorry M4rtini, you can see that im still learning but do I add that line at the top of all of my .py test files? – Pelican Jan 16 '14 at 22:04
  • Yeah that's what you would have to do. There are other way's do do it, but unless this is a permanent location for it. I usually just add the path like this. http://stackoverflow.com/questions/3402168/permanently-add-a-directory-to-pythonpath This post give's many other alternatives. – M4rtini Jan 16 '14 at 22:08
  • weird, maybe the string got escaped. try to put a r in front of the string(`r"c:\user..."`). Both the framework and api_driver have a `__init__.py` file in them, so they should get recognized as module folders. – M4rtini Jan 16 '14 at 22:17