开发者

ImportError when trying to run a python unittest with pydev

开发者 https://www.devze.com 2023-01-26 03:11 出处:网络
I am getting the following error when trying to run a module as a python unittest with PyDev. Finding files...

I am getting the following error when trying to run a module as a python unittest with PyDev.

Finding files...
['C:\\Projectos\\spa\\sensor\\src\\test\\test_sensor.py'] ... done
Importing test modules ... Traceback (most recent call last):
  File "C:\eclipse\plugins\org.python.pydev.debug_1.6.3.2010100513\pysrc\runfiles.py", line 342, in __get_module_from_str
    mod = __im开发者_开发技巧port__(modname)
ImportError: No module named :\Projectos\spa\sensor\src\test\test_sensor
ERROR: Module: :\Projectos\spa\sensor\src\test\test_sensor could not be imported.
done.

I noticed the path in the ERROR: Module: line starts with ":\" but I don't know what's causing it.

Any ideas?

Thank you.


Turns out pydev does not play well with cygwin's python.

Installed python 2.7 for windows and it works.

0

精彩评论

暂无评论...
验证码 换一张
取 消