[Pyinstaller] #71: Import decimal error in iu.py

45 views
Skip to first unread message

Pyinstaller

unread,
Jun 25, 2009, 11:38:10 AM6/25/09
to oldman...@gmail.com, PyIns...@googlegroups.com
#71: Import decimal error in iu.py
------------------------------------+---------------------------------------
Reporter: oldman...@gmail.com | Owner: giovannibajo
Type: defect | Status: new
Priority: normal | Milestone:
Component: PyInstaller | Version:
Severity: normal | Keywords:
------------------------------------+---------------------------------------
It seems pyinstaller has some issues with importing cx_Oracle. When
running an exe created from a .py file with one line "import cx_Oracle" I
get back a lengthy error message that ends with "ImportError: No module
named decimal" (entire message below). If I add "import decimal" above
"import cx_Oracle" everything seems to work fine. Note that the one line
program 'import cx_Oracle' is executed with no issue before packaging to
an exe.

The following are the pyinstaller commands I used:
Makespec.py -F ImportTest.py
Build.py ImportTest\ImportTest.spec

I am working on Windows XP, PyInstaller 1.3 (downloaded in early February
if it matters), Python 2.5, cx_Oracle version 5.0.2-10g for Python 2.5,
and Oracle 10g v 10.2.0.

----ERROR MESSAGE----
C:\pyinstaller-1.3>ImportTest\ImportTest.exe
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\pyinstaller-1.3\iu.py", line 312, in importHook
mod = _self_doimport(nm, ctx, fqname)
File "C:\pyinstaller-1.3\iu.py", line 382, in doimport
mod = director.getmod(nm)
File "C:\pyinstaller-1.3\iu.py", line 215, in getmod
mod = owner.getmod(nm)
File "C:\pyinstaller-1.3\iu.py", line 77, in getmod
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
File "C:\pyinstaller-1.3\iu.py", line 334, in importHook
raise ImportError, "No module named %s" % fqname
ImportError: No module named decimal

--
Ticket URL: <http://www.pyinstaller.org/ticket/71>
Pyinstaller <http://www.pyinstaller.org>
PyInstaller Project

PyInstaller Ticket

unread,
Mar 12, 2010, 2:56:34 PM3/12/10
to PyIns...@googlegroups.com
#71: Import decimal error in iu.py
------------------------------------+---------------------------------------
Reporter: oldmantaggie@… | Owner: giovannibajo
Type: defect | Status: closed
Priority: normal | Milestone: PyInstaller 1.4
Component: PyInstaller | Version:
Severity: normal | Resolution: fixed
Keywords: |
------------------------------------+---------------------------------------
Changes (by giovannibajo):

* status: new => closed
* resolution: => fixed
* milestone: => PyInstaller 1.4


Old description:

New description:

--

Comment:

Confirmed. cx_Oracle does a hidden import of decimal.

Fixed in [777] with a new import hook.

--
Ticket URL: <http://www.pyinstaller.org/ticket/71#comment:1>

Reply all
Reply to author
Forward
0 new messages