apt-get: "Not fully installed packages"

Asked by doclist

Applied some updates suggested by Update Manager a few days ago, one of them being gnome-applets. gnome-applets didn't seem to be installed properly. Trying to do apt-get update && apt-get upgrade gives

###########################
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up gnome-applets (2.16.1-0ubuntu4) ...
Compiling /usr/lib/python2.4/site-packages/py-0.8.0_alpha2-py2.4.egg/py/test/testing/data/syntax_error.py ...
  File "/usr/lib/python2.4/site-packages/py-0.8.0_alpha2-py2.4.egg/py/test/testing/data/syntax_error.py", line 3
    this is really not python
                            ^
SyntaxError: invalid syntax

dpkg: error processing gnome-applets (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 gnome-applets
E: Sub-process /usr/bin/dpkg returned an error code (1)
#################################

Tried going to Synaptic -> Fix broken packages. Does not solve problem.
Try to uninstall gnome-applets wants me to also uninstall ubuntu-desktop. I uninstall both.
Try to apt-get install gnome-applets
but now I get
##################
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  gnome-applets
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0B/398kB of archives.
After unpacking, 1061kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package gnome-applets.
(Reading database ... 178078 files and directories currently installed.)
Unpacking gnome-applets (from .../gnome-applets_2.16.1-0ubuntu4_i386.deb) ...
Setting up gnome-applets (2.16.1-0ubuntu4) ...
Compiling /usr/lib/python2.4/site-packages/py-0.8.0_alpha2-py2.4.egg/py/test/testing/data/syntax_error.py ...
  File "/usr/lib/python2.4/site-packages/py-0.8.0_alpha2-py2.4.egg/py/test/testing/data/syntax_error.py", line 3
    this is really not python
                            ^
SyntaxError: invalid syntax

dpkg: error processing gnome-applets (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of ubuntu-desktop:
 ubuntu-desktop depends on gnome-applets; however:
  Package gnome-applets is not configured yet.
dpkg: error processing ubuntu-desktop (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 gnome-applets
 ubuntu-desktop
##################

Seems like some python related problem but I have no idea how to fix it. I'm really stuck here.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
doclist
Solved:
Last query:
Last reply:
Revision history for this message
Best doclist (dclist) said :
#1

Okay I fixed it. The gnome-applets postinstall script had a bug where it was trying to invoke compileall.py (which recursively compiles all files) on a test directory which contained a test that purposely contains a syntax error.

Revision history for this message
doclist (dclist) said :
#2

Maybe I should mention that the way I solved it is to (temporarily) comment out the problematic file 'synatx_error.py'