Comment 2 for bug 431059

Revision history for this message
Jeff Stone (stone1343) wrote :

I've been trying to be sure that everything will work with python2.6, so I figured out how to modify the package to require python2.6 instead on python2.5. Then I got this error:

jeff@ubuntu-karmic:~$ sudo dpkg -i gramps_3.1.2-1_all.deb
Selecting previously deselected package gramps.
(Reading database ... 110906 files and directories currently installed.)
Unpacking gramps (from gramps_3.1.2-1_all.deb) ...
Setting up gramps (3.1.2-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 2190, in <module>
    main()
  File "/usr/bin/pycentral", line 2184, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 1496, in run
    self.options.exclude, byte_compile_default=True)
  File "/usr/bin/pycentral", line 1092, in install
    self.default_runtime.byte_compile(self.private_files, bc_option,
AttributeError: 'NoneType' object has no attribute 'byte_compile'
dpkg: error processing gramps (--install):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for shared-mime-info ...
Processing triggers for desktop-file-utils ...
Processing triggers for man-db ...
Processing triggers for gnome-icon-theme ...
Errors were encountered while processing:
 gramps

I'm learning all this as I go along, but I see postinst failed in pycentral, and I can see the offending code in pycentral:

        if byte_compile_default:
            if self.private_files:
                self.default_runtime.byte_compile(self.private_files, bc_option,
                                                  exclude_regex, ignore_errors)

That tells me that self.default_runtime is null, but I've changed PythonVersion in the control file to 2.6.

I found a file called /usr/share/pycentral-data/pyversions.py that says supported_versions includes only python2.4 and 2.5. So now, I don't know if this is a bug in pycentral (doubt it) or whether there is a replacement for pycentral with python2.6 (more likely) or whether this is related in some way to bug #353251

I don't know if pycentral is part of Python or what it is, so I can't proceed any further for now.