TypeError: ('compile() expected string without null bytes

Asked by John Veness on 2012-05-01

I have a problem with package python-qt4 in Ubuntu 12.04 (package version 4.9.1-2ubuntu1). It's postinst script is failing, with:

Sorry: TypeError: ('compile() expected string without null bytes',)

If I manually type in the command in the postinst script, adding -v for verbose, namely:

pycompile -p python-qt4 -v

I get the output:

D: pycompile:215: argv: ['/usr/bin/pycompile', '-p', 'python-qt4', '-v']
D: pycompile:216: options: {'force': False, 'verbose': True, 'package': 'python-qt4', 'regexpr': None, 'vrange': None, 'optimize': False}
D: pycompile:217: args: []
Sorry: TypeError: ('compile() expected string without null bytes',)

(so not much more informative).

Any ideas? This happened during an Ubuntu 11.10 to 12.04 upgrade.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu python-qt4 Edit question
Assignee:
No assignee Edit question
Solved by:
John Veness
Solved:
2012-05-23
Last query:
2012-05-23
Last reply:
John Veness (pelago) said : #1

Solved. See linked bug for details.