Problem using compileall

Stephen Hansen apt.shansen at
Tue Feb 3 08:53:06 CET 2009

I'm having a slight problem with pre-compiling some files for distribution
that I'm not sure where to even look for.

An excerpt from an output:

    C:\mother\Python24\core\application\sysconfig>python -m compileall .
    Listing . ...
    Compiling .\ ...
    Sorry: TypeError: ('compile() expected string without null bytes',)
    Compiling .\ ...

The BulkListClass is then not creating a PYC.

Yet, if I:

    Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import BulkListClass

It imports the module fine and made the PYC file.

I'm not sure why compileall is failing to compile that file, yet Python can
import it to do so.

Any suggestions for how to debug this?

This is Python 2.4.3 on Windows Vista.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list