error with /usr/lib/python2.3/compileall.py: "Sorry invalid mode: U"

Marco Herrn herrn at gmx.net
Fri Jan 9 13:13:43 EST 2004


Hi,

I tried to install a package under debian, where in the postinstall
phase some python scripts are called. Then I got the error
"Sorry invalid mode: U".
I looked what this script does and it is the following:

	python -O /usr/lib/python2.3/compileall.py /usr/share/woody

I looked where exactly in compileall.py the error occurs and it is here:

                try:
                    print fullname
                    print None
                    print dfile
                    print True
                    ok = py_compile.compile(fullname, None, dfile, True)
                except KeyboardInterrupt:
                    raise KeyboardInterrupt
                except py_compile.PyCompileError,err:
                    print err.msg
                    success = 0
                except IOError, e:
                    print "Sorry", e
                    success = 0

So it obviously runs into the IOError. Then I altered the script to see
what parameters are given to the method py_compile.compile. Here is one
example of it:

	fullname: /usr/share/woody/woody_xml.py
		  None
	dfile:	  None
		  1

I looked after the permissions on the file
/usr/share/woody/woody_xml.py, it is:

	-rw-r--r--    1 root     root

Now I don't have any idea why there is an IOError. Ist it because dfile
is None? What is dfile for? Where can here be the error?

Bye
Marco



-- 
Marco Herrn             herrn at gmx.net
(GnuPG/PGP-signed and crypted mail preferred)
Key ID: 0x94620736




More information about the Python-list mailing list