Single File with WXPython fails, _core_ ImportError - Directory works

360 views
Skip to first unread message

dmarkey

unread,
Dec 12, 2011, 12:08:24 PM12/12/11
to PyInstaller
This is the traceback. The app works fine in a single directory, but
not as a single file.

Traceback (most recent call last):
File "<string>", line 5, in <module>
File "/home/dmarkey/pyinstaller/trunk/PyInstaller/loader/iu.py",
line 449, in importHook
mod = _self_doimport(nm, ctx, fqname)
File "/home/dmarkey/pyinstaller/trunk/PyInstaller/loader/iu.py",
line 539, in doimport
exec co in mod.__dict__
File "/home/dmarkey/sharefuse/build/pyi.linux2/gui/outPYZ1.pyz/wx",
line 45, in <module>
File "/home/dmarkey/pyinstaller/trunk/PyInstaller/loader/iu.py",
line 449, in importHook
mod = _self_doimport(nm, ctx, fqname)
File "/home/dmarkey/pyinstaller/trunk/PyInstaller/loader/iu.py",
line 539, in doimport
exec co in mod.__dict__
File "/home/dmarkey/sharefuse/build/pyi.linux2/gui/outPYZ1.pyz/
wx._core", line 4, in <module>
File "/home/dmarkey/pyinstaller/trunk/PyInstaller/loader/iu.py",
line 468, in importHook
raise ImportError("No module named %s" % fqname)
ImportError: No module named _core_

_core_.so actually is included in the archive.

Hartmut Goebel

unread,
Dec 12, 2011, 2:05:47 PM12/12/11
to pyins...@googlegroups.com
Am 12.12.2011 18:08, schrieb dmarkey:
> This is the traceback. The app works fine in a single directory, but
> not as a single file.
> [...]

> _core_.so actually is included in the archive.

Thanks, we need more invormation to dig this down. Please follw the
instructions at
<http://www.pyinstaller.org/wiki/HowtoReportBugs#Whensubmittingabug:Informationweneed>.

--
Sch�nen Gru� - Regards
Hartmut Goebel
Dipl.-Informatiker (univ.), CISSP, CSSLP

Goebel Consult
Spezialist f�r IT-Sicherheit in komplexen Umgebungen
http://www.goebel-consult.de

Monatliche Kolumne: http://www.cissp-gefluester.de/
Goebel Consult ist Mitglied bei http://www.7-it.de

David Markey

unread,
Dec 12, 2011, 3:03:09 PM12/12/11
to pyins...@googlegroups.com
Hey,

Versions:

Python: 2.7.2+
WX:  '2.8.11.0 (gtk2-unicode)'
Distro: Kubuntu 11.10, 32bit
PyInstaller:  '2.0dev'(Trunk)

Script:

---------------------
import wx ## This is it
-----------------------

Spec:
# -*- mode: python -*-
a = Analysis([os.path.join(HOMEPATH,'support/_mountzlib.py'), os.path.join(CONFIGDIR,'support/useUnicode.py'), 'repro.py'],
             pathex=['/home/dmarkey'],
             hookspath=None)
pyz = PYZ(a.pure)
exe = EXE( pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,
          name=os.path.join('dist', 'repro'),
          debug=False,
          strip=None,
          upx=True,
          console=True )





On 12 December 2011 19:05, Hartmut Goebel <h.go...@goebel-consult.de> wrote:
Am 12.12.2011 18:08, schrieb dmarkey:
This is the traceback. The app works fine in a single directory, but
not as a single file.
[...]

_core_.so actually is included in the archive.

Thanks, we need more invormation to dig this down. Please follw the instructions at <http://www.pyinstaller.org/wiki/HowtoReportBugs#Whensubmittingabug:Informationweneed>.


--
Schönen Gruß - Regards

Hartmut Goebel
Dipl.-Informatiker (univ.), CISSP, CSSLP

Goebel Consult
Spezialist für IT-Sicherheit in komplexen Umgebungen

http://www.goebel-consult.de

Monatliche Kolumne: http://www.cissp-gefluester.de/
Goebel Consult ist Mitglied bei http://www.7-it.de


--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To post to this group, send email to pyins...@googlegroups.com.
To unsubscribe from this group, send email to pyinstaller+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyinstaller?hl=en.


David Markey

unread,
Dec 12, 2011, 3:18:01 PM12/12/11
to pyins...@googlegroups.com
1.5.1 works FYI.

Hartmut Goebel

unread,
Dec 12, 2011, 3:31:14 PM12/12/11
to pyins...@googlegroups.com
Am 12.12.2011 21:18, schrieb David Markey:
> 1.5.1 works FYI.
>
Thanks for the info and the quick answer. I don't know, when I will find
time to look into this, and Martin also busy. So please use 1.5.1 for now.

--
Sch�nen Gru� - Regards


Hartmut Goebel
Dipl.-Informatiker (univ.), CISSP, CSSLP

Goebel Consult
Spezialist f�r IT-Sicherheit in komplexen Umgebungen

Hartmut Goebel

unread,
Dec 13, 2011, 10:00:34 AM12/13/11
to pyins...@googlegroups.com
Hi,

I added a ticket, so it will not get lost.
http://www.pyinstaller.org/ticket/478

--
Sch�nen Gru� - Regards


Hartmut Goebel
Dipl.-Informatiker (univ.), CISSP, CSSLP

Goebel Consult
Spezialist f�r IT-Sicherheit in komplexen Umgebungen

Message has been deleted

mmiscavage

unread,
Jun 20, 2012, 7:00:14 PM6/20/12
to pyins...@googlegroups.com
I am having a similar problem so I'm posting it here instead of starting a new thread. 

Using the newest download (pyinstaller-pyinstaller-2145d84.zip), Windows 7, Python 2.6, Wx 2.8.12.1.

I don't receive the ' ImportError: No module named _core_ ' on initialization of my GUI but when a multiprocessing method is called. If multiprocessing is deactivated the GUI works perfectly. Wx._core_.pyd is included in the dist folder as well as all the needed .dll files. The GUI also works perfectly on Mac with and without multiprocessing activated. When built with Pyinstaller 1.5.1 on Windows 7 the GUI doesn't throw the ' ImportError: No module named _core_ ' but instead runs with a single core when asked to use multiprocessing. Any thoughts on solving either of these problems so I can have a full featured Windows executable?



On Tuesday, December 13, 2011 7:00:34 AM UTC-8, Hartmut Goebel wrote:
Hi,

I added a ticket, so it will not get lost.
http://www.pyinstaller.org/ticket/478

--
Sch�nen Gru� - Regards


Hartmut Goebel
Dipl.-Informatiker (univ.), CISSP, CSSLP

Goebel Consult
Spezialist f�r IT-Sicherheit in komplexen Umgebungen
http://www.goebel-consult.de

Don Dwiggins

unread,
Jun 26, 2012, 11:41:47 AM6/26/12
to pyins...@googlegroups.com
On 6/20/12 4:00 PM, mmiscavage wrote:
> I am having a similar problem so I'm posting it here instead of
> starting a new thread.
>
> Using the newest download (pyinstaller-pyinstaller-2145d84.zip),
> Windows 7, Python 2.6, Wx 2.8.12.1.
>
> I don't receive the ' ImportError: No module named _core_ '
> on initialization of my GUI but when a multiprocessing method is
> called. If multiprocessing is deactivated the GUI works perfectly.
> Wx._core_.pyd is included in the dist folder as well as all the needed
> .dll files. The GUI also works perfectly on Mac with and without
> multiprocessing activated. When built with Pyinstaller 1.5.1 on
> Windows 7 the GUI doesn't throw the ' ImportError: No module named
> _core_ ' but instead runs with a single core when asked to use
> multiprocessing. Any thoughts on solving either of these problems so I
> can have a full featured Windows executable?

It sounds like your problem may be similar to the one I had, reported in
http://www.pyinstaller.org/ticket/569: when an executable built with
PyInstaller executes another one (using Popen in my case), the
environment for the subprocess gets set up incorrectly, causing
_core_.pyd not to be found.

I'm using the 'develop' branch of PyInstaller, but you might have
success doing what I did to work around the problem (documented in the
ticket): essentially, get the folder support/loader/Windows-32bit from
the branch 'fix_merge_case' and replace the corresponding folder in your
PyInstaller installation. Let us know if it works.

--

Don Dwiggins
Advanced Publishing Technology


Martin Zibricky

unread,
Jun 26, 2012, 2:11:59 PM6/26/12
to pyins...@googlegroups.com
Don Dwiggins píše v Út 26. 06. 2012 v 08:41 -0700:
> It sounds like your problem may be similar to the one I had, reported
> in
> http://www.pyinstaller.org/ticket/569: when an executable built with
> PyInstaller executes another one (using Popen in my case), the
> environment for the subprocess gets set up incorrectly, causing
> _core_.pyd not to be found.

It really sounds similar.

mmiscavage

unread,
Jun 26, 2012, 5:57:59 PM6/26/12
to pyins...@googlegroups.com
Thanks for replying, this has moved me past that error to an attribute error trying to call a method of my code in each multiprocess. I suspect I'll have to debug that on my own. 
Reply all
Reply to author
Forward
0 new messages