package screen-resolution-extra 0.16 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1249460 reported by cacula
78
This bug affects 15 people
Affects Status Importance Assigned to Milestone
screen-resolution-extra (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

while upgrading

ProblemType: Package
DistroRelease: Ubuntu 14.04
Package: screen-resolution-extra 0.16
ProcVersionSignature: Ubuntu 3.12.0-2.5-generic 3.12.0
Uname: Linux 3.12.0-2-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.12.6-0ubuntu1
Architecture: amd64
Date: Fri Nov 8 19:28:28 2013
DuplicateSignature: package:screen-resolution-extra:0.16:subprocess installed post-installation script returned error exit status 1
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2013-11-03 (5 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20131103)
MarkForUpload: True
PackageArchitecture: all
SourcePackage: screen-resolution-extra
Title: package screen-resolution-extra 0.16 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
cacula (cacula) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in screen-resolution-extra (Ubuntu):
status: New → Confirmed
Revision history for this message
martyfelker (martyfelker-gmail) wrote :

Affect me. Ubuntu Trusty. I can't update anymore and need to solve urgently

Revision history for this message
James Plate (james-plate-deactivatedaccount) wrote :

This has affected me as well, the following is an excerpt from the result of today's dist-upgrade:

Setting up screen-resolution-extra (0.16) ...
  File "/usr/share/screen-resolution-extra/nvidia-prime.py", line 64
    except dbus.exceptions.DBusException, e:
                                                                              ^
SyntaxError: invalid syntax

Revision history for this message
Carla Sella (carla-sella) wrote :

Same here:
letozaf@letozaf-pc:~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up screen-resolution-extra (0.16) ...
  File "/usr/share/screen-resolution-extra/nvidia-prime.py", line 64
    except dbus.exceptions.DBusException, e:
                                        ^
SyntaxError: invalid syntax

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

Revision history for this message
Gary Allpike (garyallpike) wrote :

To fix this:

You can edit the file:

/usr/share/screen-resolution-extra/nvidia-prime.py

Find line 64 which looks like:

        except dbus.exceptions.DBusException, e:

and change it to:

        except dbus.exceptions.DBusException as e:

This should resolve the problem.

Cheers!

Revision history for this message
DarkLinkXXXX (darklinkxxxx) wrote :

Downloaded the screen-resolution-extra_0.16.orig.tar.gz tarball, which I believe was the version indicated, and it worked with just a simple "sudo ./setup.py install" away from working. Already fixed?

Revision history for this message
Gary Allpike (garyallpike) wrote :

The problem is not with setup.py.

The error is in the nvidia-prime.py script.

I have checked the source tarball and the error is also present there.

Revision history for this message
cacula (cacula) wrote :

This is how i fixed it:

- sudo nano /usr/share/screen-resolution-extra/nvidia-prime.py
- Apply the changes proposed by garyallpike in Post #7 -> Thank you :-)
- Save the file
- sudo dpkg --configure screen-resolution-extra

Cheers!

Revision history for this message
cacula (cacula) wrote :

It's not Post #7 but rather #6. Sorry.

Revision history for this message
ubername (ubername) wrote :

Thanks, fixed using above. How would I have found out the syntax for dbus.exceptions.DBusException myself?

Revision history for this message
Gary Allpike (garyallpike) wrote :

It's actually not a syntax error related to dbus.exceptions.DBusException, but rather an error in the syntax of the python exception handler syntax.

I looked at the output of dpkg when it tried to configure the package:

----
Setting up screen-resolution-extra (0.16) ...
  File "/usr/share/screen-resolution-extra/nvidia-prime.py", line 64
    except dbus.exceptions.DBusException, e:
                                        ^
SyntaxError: invalid syntax

dpkg: error processing screen-resolution-extra (--configure):
 subprocess installed post-installation script returned error exit status 1
----

and saw the above.

I have no python-fu at all, I simply googled for "python except" and clicked on the first result :)

Cheers!

Revision history for this message
Cavsfan (cavsfan) wrote :

Thanks post #6 fixed this error for me too.
It was able to setup screen-resolution-extra.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package screen-resolution-extra - 0.16ubuntu1

---------------
screen-resolution-extra (0.16ubuntu1) trusty; urgency=low

  * Fix syntax error in nvidia-prime.py which broke upgrades. (LP: #1249460)
 -- Iain Lane <email address hidden> Sat, 09 Nov 2013 17:47:47 +0000

Changed in screen-resolution-extra (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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