Re: [cx-freeze-users] expected string without null bytes
Brought to you by:
atuining
From: Luis Q. <l.q...@4c...> - 2010-04-15 22:04:46
|
Hi Anthony, The file that trigers the exception is Console.pyc, which is indeed a binary file: lquesada@lquesada-laptop:~/workspace/MetroNode/src/models$ file -bi /usr/lib/pymodules/python2.6/cx_Freeze/initscripts/Console.pyc application/octet-stream; charset=binary I am attaching the modified finder.py that I used to find out this. I only added a print statement at Line 259. This seems to be a problem with the distribution of Freeze that I am using (4.0.1). Cheers, Luis Anthony Tuininga wrote: > Hi, > > Just a guess but it looks like a particular module has null bytes in > it. Try running the compile() yourself in Python directly. You should > get the same result. > > Anthony > > On Wed, Apr 14, 2010 at 4:03 PM, Luis Quesada <l.q...@4c...> wrote: > >> Dear all, >> I am getting an "expected string without null bytes" error when using >> cxfreeze in Linux-Ubuntu. I modified finder.py so that it prints the >> name of the module before the compile statement that triggers the >> exception. The trace that I get now is at the end. >> It seems the problem is taking place when trying cx_Freeze__init__ .... >> Could some body explain the issue? >> Thanks in advance! >> Cheers, >> Luis >> >> =================================================================== >> lquesada@lquesada-laptop:~/workspace/MetroNode/src/models$ cxfreeze >> uncovered.py --target-dir dist >> compiling os >> compiling posixpath >> compiling stat >> compiling genericpath >> compiling warnings >> compiling linecache >> compiling types >> compiling re >> compiling sre_compile >> compiling sre_parse >> compiling sre_constants >> compiling copy_reg >> compiling UserDict >> compiling _abcoll >> compiling abc >> compiling copy >> compiling repr >> compiling subprocess >> compiling traceback >> compiling threading >> compiling functools >> compiling _strptime >> compiling locale >> compiling encodings >> compiling codecs >> compiling encodings.aliases >> compiling calendar >> compiling optparse >> compiling textwrap >> compiling string >> compiling gettext >> compiling struct >> compiling StringIO >> compiling token >> compiling tokenize >> compiling dummy_thread >> compiling collections >> compiling keyword >> compiling doctest >> compiling __future__ >> compiling inspect >> compiling dis >> compiling opcode >> compiling unittest >> compiling getopt >> compiling difflib >> compiling heapq >> compiling bisect >> compiling pdb >> compiling cmd >> compiling bdb >> compiling pprint >> compiling shlex >> compiling tempfile >> compiling random >> compiling _threading_local >> compiling pickle >> compiling __main__ >> compiling Numberjack >> compiling Decomp >> copying /usr/lib/pymodules/python2.6/cx_Freeze/bases/Console -> dist/ >> uncovered >> copying /usr/lib/libpython2.6.so.1.0 -> dist/libpython2.6.so.1.0 >> compiling cx_Freeze__init__ >> Traceback (most recent call last): >> File "/usr/bin/cxfreeze", line 5, in <module> >> main() >> File "/usr/lib/pymodules/python2.6/cx_Freeze/main.py", line 170, in >> main >> freezer.Freeze() >> File "/usr/lib/pymodules/python2.6/cx_Freeze/freezer.py", line 405, >> in Freeze >> self._FreezeExecutable(executable) >> File "/usr/lib/pymodules/python2.6/cx_Freeze/freezer.py", line 173, >> in _FreezeExecutable >> exe.copyDependentFiles, scriptModule) >> File "/usr/lib/pymodules/python2.6/cx_Freeze/freezer.py", line 333, >> in _WriteModules >> initModule = finder.IncludeFile(initScript, "cx_Freeze__init__") >> File "/usr/lib/pymodules/python2.6/cx_Freeze/finder.py", line 387, >> in IncludeFile >> deferredImports) >> File "/usr/lib/pymodules/python2.6/cx_Freeze/finder.py", line 260, >> in _LoadModule >> module.code = compile(fp.read() + "\n", path, "exec") >> TypeError: compile() expected string without null bytes >> >> =================================================================== >> >> >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev >> _______________________________________________ >> cx-freeze-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-freeze-users >> >> > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > cx-freeze-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-freeze-users > > -- Luis Quesada Research Scientist Cork Constraint Computation Centre University College Cork Cork - Ireland Phone: (+353) 21 420 5376 Fax: (+353) 21 420 5369 Web: http://4c.ucc.ie/~lquesada |