Hey, 

Is DaemonContext not working properly in combination with pyinstaller?

When running this code:

> import daemon
> import sys
> from time import sleep
> print 'outside'
> with daemon.DaemonContext(detach_process=False, stderr=sys.stderr, 
> stdout=sys.stdout):
>     print 'inside'
>     sleep(20)
> print 'out'




And compiling it with this command:

> env/bin/pyinstaller --onefile tryouts/daemon_test.py

 
I get this as output:

> outside
> inside
> out
> close failed in file object destructor:
> IOError: [Errno 9] Bad file descriptor



At least the app runs, but with more complex code, I get:

Traceback (most recent call last):
  File "<string>", line 398, in <module>
  File "<string>", line 300, in start
  File 
"/Users/jan/swprojects/openport-client/scripts/client/build/openport/out00-PYZ.pyz/manager.dbhandler",
 
line 178, in getInstance
  File 
"/Users/jan/swprojects/openport-client/scripts/client/build/openport/out00-PYZ.pyz/manager.dbhandler",
 
line 50, in __init__
  File 
"/Users/jan/swprojects/openport-client/scripts/client/build/openport/out00-PYZ.pyz/sqlalchemy.engine",
 
line 346, in create_engine
  File 
"/Users/jan/swprojects/openport-client/scripts/client/build/openport/out00-PYZ.pyz/sqlalchemy.engine.strategies",
 
line 51, in create
  File 
"/Users/jan/swprojects/openport-client/scripts/client/build/openport/out00-PYZ.pyz/sqlalchemy.engine.url",
 
line 117, in get_dialect
  File 
"/Users/jan/swprojects/openport-client/scripts/client/build/openport/out00-PYZ.pyz/sqlalchemy.util.langhelpers",
 
line 177, in load
  File 
"/Users/jan/swprojects/openport-client/scripts/client/build/openport/out00-PYZ.pyz/sqlalchemy.dialects",
 
line 35, in _auto_fn
  File 
"/Users/jan/swprojects/openport-client/scripts/client/env/lib/python2.6/site-packages/PyInstaller/loader/pyi_importers.py",
 
line 202, in load_module
    is_pkg, bytecode = self._pyz_archive.extract(fullname)
  File 
"/Users/jan/swprojects/openport-client/scripts/client/env/lib/python2.6/site-packages/PyInstaller/loader/pyi_archive.py",
 
line 313, in extract
    self.lib.seek(self.start + pos)

And the app crashes.

Without pyinstaller, I do not have these problems.
 
Is there anything I can do to change this?
Thanks, 

Jan
 

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.

Reply via email to