import failure with IronPython
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DreamPie |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Problem: Imports fail with IronPython for subpackages or mapped drives
Steps to Reproduce:
1. Install IronPython, configure DreamPie shortcut with
"C:\Program Files\DreamPie\
2. Launch DreamPie
3. Import any file or package not in the Lib directory
"""
IronPython 2.6 (2.6.10920.0) on .NET 2.0.50727.3607
Type "copyright", "credits" or "license()" for more information.
DreamPie 1.0.2
>>> import xml.etree
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import xml.etree
File "C:\Program Files\DreamPie\
raise ZipImportError(msg)
ZipImportError: Non-file 'C:\\Program Files\\IronPython 2.6\\Lib\\xml' found for 'C:\\Program Files\\IronPython 2.6\\Lib\\xml'
>>> import sys
>>> sys.path_hooks
0: [<class py_zipimport.
"""
Comments:
C:\Program Files\DreamPie\
"""
if sys.platform == 'cli':
# IronPython doesn't have built-in zipimport.
import py_zipimport
"""
It looks like this version of py_zipimport is intercepting imports, then failing on imports that are not from zip files.
A workaround is to clear sys.path_hooks: share\dreampie\ py_zipimport. py", line 97, in __init__ ElementTree' from 'C:\Program Files\IronPython 2.6\Lib\ xml\etree\ ElementTree. py'>
"""
IronPython 2.6 (2.6.10920.0) on .NET 2.0.50727.3607
Type "copyright", "credits" or "license()" for more information.
DreamPie 1.0.2
>>> from xml.etree import ElementTree
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from xml.etree import ElementTree
File "C:\Program Files\DreamPie\
raise ZipImportError(msg)
ZipImportError: Non-file 'C:\\Program Files\\IronPython 2.6\\Lib\\xml' found for 'C:\\Program Files\\IronPython 2.6\\Lib\\xml'
>>> import sys; sys.path_hooks=[]
>>> from xml.etree import ElementTree
>>> ElementTree
0: <module 'xml.etree.
"""