By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,569 Members | 1,358 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,569 IT Pros & Developers. It's quick & easy.

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

P: n/a
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 he***@gmx.net
(GnuPG/PGP-signed and crypted mail preferred)
Key ID: 0x94620736

Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.