package language-selector-common 0.2.10 failed to install/upgrade: subprocess post-installation script returned error exit status 1

Bug #193260 reported by Márcio Santos
6
Affects Status Importance Assigned to Milestone
language-selector (Ubuntu)
New
Undecided
Unassigned

Bug Description

I was updating Hardy Heron and I got the following error:

Preparing to replace language-selector-common 0.2.10 (using .../language-selector-common_0.2.10_all.deb) ...
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1593, in <module>
    main()
  File "/usr/bin/pycentral", line 1587, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 1145, in run
    pkg = DebPackage('package', self.args[0], oldstyle=False)
  File "/usr/bin/pycentral", line 295, in __init__
    self.read_pyfiles()
  File "/usr/bin/pycentral", line 315, in read_pyfiles
    lines = self.read_preinst_pkgconfig()
  File "/usr/bin/pycentral", line 403, in read_preinst_pkgconfig
    self.pkgconfig.readfp(cStringIO.StringIO(buffer.getvalue()))
AttributeError: 'NoneType' object has no attribute 'getvalue'
dpkg: warning - old pre-removal script returned error exit status 1
dpkg - trying script from the new package instead ...
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1593, in <module>
    main()
  File "/usr/bin/pycentral", line 1587, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 1145, in run
    pkg = DebPackage('package', self.args[0], oldstyle=False)
  File "/usr/bin/pycentral", line 295, in __init__
    self.read_pyfiles()
  File "/usr/bin/pycentral", line 315, in read_pyfiles
    lines = self.read_preinst_pkgconfig()
  File "/usr/bin/pycentral", line 403, in read_preinst_pkgconfig
    self.pkgconfig.readfp(cStringIO.StringIO(buffer.getvalue()))
AttributeError: 'NoneType' object has no attribute 'getvalue'
dpkg: error processing /var/cache/apt/archives/language-selector-common_0.2.10_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Traceback (most recent call last):
  File "/usr/bin/pycentral", line 1593, in <module>
    main()
  File "/usr/bin/pycentral", line 1587, in main
    rv = action.run(global_options)
  File "/usr/bin/pycentral", line 1015, in run
    pkg = DebPackage('package', self.args[0], oldstyle=False)
  File "/usr/bin/pycentral", line 295, in __init__
    self.read_pyfiles()
  File "/usr/bin/pycentral", line 315, in read_pyfiles
    lines = self.read_preinst_pkgconfig()
  File "/usr/bin/pycentral", line 403, in read_preinst_pkgconfig
    self.pkgconfig.readfp(cStringIO.StringIO(buffer.getvalue()))
AttributeError: 'NoneType' object has no attribute 'getvalue'
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/language-selector-common_0.2.10_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
ifthengoto (febwa1976) wrote :

Same for me when upgrading to Hardy from Gutsy.

Revision history for this message
Iron Rat (theironrat) wrote :

Same with me when upgrading from Gutsy to Hardy

Revision history for this message
RicardoDelcastanher (ricardo-insightfull) wrote :

To fix this problem edit the file:

/usr/bin/pycentral

go to line 1592 and comment that line:

#if __name__ == '__main__':

Save and exit.

Revision history for this message
Pavel Mlčoch (pavkamlc) wrote :

it works.

Revision history for this message
miked (miked11) wrote :

Thanks, fixed it all for me, and it was fun and easy also.

Revision history for this message
lojeda (lhojeda) wrote :

it works, thanks

Revision history for this message
juacarra (juacarrag) wrote :

Thanks, easy and clean

Revision history for this message
Guybrush88 (guybrush) wrote :

worked. thanks

Revision history for this message
Roque (roque-rafael) wrote :

Same for me, but RicardoDelcastanher solution works well.

O mesmo erro comigo, mas a solução de RicardoDelcastanher funcionou bem.

Revision history for this message
balak (balak) wrote :

the workaround worked for me.

I hope this gets rolled in soon..

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.