#1405 Project containing stat.py causes failure to execute

closed-wont-fix
nobody
None
5
2014-10-11
2011-10-13
No

environnement:
pydev v 2.1.0
eclipse Galileo
python 3.2
windows XP

How to reproduce:
Create a project with at least two modules, on module being named "stat.py"

Run the other module as a python program. pydev fails with:

Traceback (most recent call last):
File "C:\BDF\Python32\lib\site.py", line 529, in <module>
main()
File "C:\BDF\Python32\lib\site.py", line 518, in main
known_paths = addsitepackages(known_paths)
File "C:\BDF\Python32\lib\site.py", line 309, in addsitepackages
if os.path.isdir(sitedir):
File "C:\BDF\Python32\lib\genericpath.py", line 44, in isdir
return stat.S_ISDIR(st.st_mode)
AttributeError: 'module' object has no attribute 'S_ISDIR'

On a more complex project (but I haven't found out what makes the difference) pydev fails with
Fatal Python error: Py_Initialize: can't initialize sys standard streams Traceback (most recent call last): File "C:\Python32\lib\io.py", line 60, in <module> This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

What I was expecting
The program should run normally. There is no problem with python.exe

Discussion

  • Régis Décamps

    Régis Décamps - 2011-10-13

    I forgot to mention
    * there is no error message in Eclipse log
    * Eclipse is in c:\aze\eclipse-galieo
    * workspace is in "My Documents"/workspace

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2011-10-13

    Unfortunately, there's not much PyDev can do about it... That's expected as you're overwriting the Python 'stat' module and because of that Python itself can't start normally (the solution is renaming your 'stat' module to something else).

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2011-10-13
    • status: open --> closed-wont-fix
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks