AttributeError: 'NoneType' object has no attribute 'remove_byte_code'

Bug #95792 reported by mithro
2
Affects Status Importance Assigned to Milestone
python-central (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: python-central

When uninstalling some python packages the following error occurs,

tim@ultraslim:~/oss/fdti/ftd2xx$ sudo apt-get remove python-gst0.10
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  vmware-player-kernel-modules-2.6.20-11 hpijs hpijs-ppds
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED
  python-gst0.10 serpentine
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
Need to get 0B of archives.
After unpacking 2150kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 126429 files and directories currently installed.)
Removing serpentine ...
Removing python-gst0.10 ...
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1387, in <module>
    main()
  File "/usr/bin/pycentral", line 1381, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 955, in run
    pkg.remove(runtimes, remove_script_files=True)
  File "/usr/bin/pycentral", line 700, in remove
    default_runtime.remove_byte_code(self.private_files)
AttributeError: 'NoneType' object has no attribute 'remove_byte_code'
dpkg: error processing python-gst0.10 (--remove):
 subprocess pre-removal script returned error exit status 1
Errors were encountered while processing:
 python-gst0.10
E: Sub-process /usr/bin/dpkg returned an error code (1)

It seems that doing the following fixes the problem,
Change line 700 from
                default_runtime.remove_byte_code(self.private_files)
to
                self.default_runtime.remove_byte_code(self.private_files)

Don't know if this is the correct fix (everything else in that class also appears to use self.default_runtime rather then default_runtime).

Running Feisty Fawn development release.

tim@ultraslim:~/oss/fdti/ftd2xx$ dpkg --list | grep python-central
ii python-central 0.5.12ubuntu2 register and build utility for Python packag

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.