I've have success to compile _PythonCard-0.8.2.win32_
sample programs with _py2exe_ but these programs
doesn't run because the trouble below:
/
Minimal.exe.log/
Traceback (most recent call last):
File "minimal.py", line 14, in ?
File "PythonCard\model.pyc", line 366, in __init__
File "PythonCard\resource.pyc", line 45, in __init__
File "PythonCard\util.pyc", line 39, in
readAndEvalFile
TypeError: coercing to Unicode: need string or buffer,
NoneType found
py2exe version = 0.6.5.win32-py2.4
wxPython version = 2.7-win32-2.7.1.3-py24
Python version = 2.4.4
Minimal.py error details:
Traceback (most recent call last):
File "minimal.py", line 14, in ?
comand line -> app = model.Application(Minimal)
File "PythonCard\model.pyc", line 366, in __init__
comand line -> self.resource = resource.ResourceFile
(aFileName).getResource()
File "PythonCard\resource.pyc", line 45, in __init__
comand line -> self.dictionary = ReadAndEvalFile
(rsrcFileName)
File "PythonCard\util.pyc", line 39, in
readAndEvalFile
comand line -> f = open(filename)
TypeError: coercing to Unicode: need string or buffer,
NoneType found
from fxl@onda.com.br
Logged In: NO
I am having the same problem as this, were you able to rectify the problem?
Please let me know.
PythonCard is great to use, but If I can't compile...
Your compiled application is lacking the resource fil (minimal.rsrc.py).
This can be fixed in 2 ways:
1. Include resource file inside minimal.py
rsrc = "minimal.rsrc.py data"
and change:
app = model.Application(Minimal)
to:
app = model.Application(Minimal, None, rsrc)
2. Copy minimal.rsrc.py to the compile output folder (.\dist\)
Can be done by adding it to the setup.py (used to setup compiler)
setup( data_files = [('.', ['minimal.rsrc.py'])] )