I seem to have another stange problem, and I was wondering if any of you
encountered this before.
We use logging extensively in our application, but when I pack the
program with pyInstaller, I get some IOErrors:
Trace:
File ".....\out1.pyz/logging", line xxx, in emit
File ".....\out1.pyz/logging", line xxx, in flush
IOError: [Errno 9] Bad file descriptor
everytime I try to log something.
As mentioned before, I use wxPython 2.8.1.1, Python 2.5 and pyInstaller 1.3
The strange thing is, when I use a smaller version of our program (some
extra classes are not initialized, fewer windows, like a demo mode) the
logging works.
So I was hoping for some hints before I try to crawl through the program
and construct test cases. Anyone encountered this before? Could it be
connected to multiple logger instanciations?
Hannes
Can anyone think of a possible cause? That would really help me in
pinpointing the problem and creating a test case...
Hannes
Does this happen if you package the program in console mode? Does this happen
if you run your application (unpackaged) with "pythonw"?
--
Giovanni Bajo
I will test it today, but I found a "workaround" of sorts by just
redirecting the log to a file, then it works.
Will follow up to your questions later today.
Thanks,
Hannes
It happens when I run the unpackaged application with "pythonw". It does
not happen when I run it with "python".
Hannes
>> I will test it today, but I found a "workaround" of sorts by just
>> redirecting the log to a file, then it works.
>> Will follow up to your questions later today.
>>
>> Thanks,
>> Hannes
>
> It happens when I run the unpackaged application with "pythonw". It does
> not happen when I run it with "python".
Thus, I would say that you should bring this to the logging guys. It
might not even be a bug, only an (undocumented? unclear?) quirk. But I
think it is not related to PyInstaller.
--
Giovanni Bajo
Here's a thought: if you're logging to stdout or stderr, those file
objects may not be instantiated by pythonw. I seem to remember this
being reported on the wxPython list (try searching that list for "stdout
or stderr").
HTH,
--
Don Dwiggins
Advanced Publishing Technology
Ah yes, now I remember...
Thanks for all the advice!
Hannes