Hi,

I think I know the reason for this now. I just installed Python 2.7
and ran into this problem on my Linux box a few days ago.
Specifically, in your initscripts directory, the installation decided
to byte compile the initscripts and so when cx_Freeze is looking for a
named initscript it finds the .pyc file instead of the .py and
attempts to compile it with disastrous results. :-) The solution is to
simply remove the .pyc and .pyo files in the initscripts directory and
all should be well. I am intending to fix this problem for the next
release but in the meantime the solution is fairly simple to do.

Anthony

On Fri, Jul 9, 2010 at 3:59 AM, julian bilcke <[email protected]> wrote:
>
> Hi,
> I seem to have the same issue than Luis Quesada posted a few months ago
> : http://sourceforge.net/mailarchive/message.php?msg_name=4BC63B97.10809%404c.ucc.ie
> I used his modified finder.py to find the error :
>
> copying /usr/lib/pymodules/python2.6/cx_Freeze/bases/Console ->
> dist/httpserver
> copying /usr/lib/libpython2.6.so.1.0 -> dist/libpython2.6.so.1.0
> compiling name:cx_Freeze__init__
> path:/usr/lib/pymodules/python2.6/cx_Freeze/initscripts/Console.pyc
> 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
>
> I am using cx_freeze 4.0.1-0ubuntu3.
>
> Thanks in advance for your reply!
>
> Julian
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> cx-freeze-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/cx-freeze-users
>
>

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
cx-freeze-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users

Reply via email to