package python-pyatspi 1.29.5-0ubuntu1 failed to install/upgrade: invalid syntax error for python2.4

Bug #506357 reported by Matt Zimmerman
64
This bug affects 12 people
Affects Status Importance Assigned to Milestone
at-spi (Ubuntu)
Fix Released
Undecided
Luke Yelavich

Bug Description

Binary package hint: at-spi

I upgraded to the latest Lucid packages today, and python-pyatspi failed to upgrade due to this bug.

ProblemType: Package
Architecture: i386
Date: Tue Jan 12 09:11:11 2010
DistroRelease: Ubuntu 10.04
ErrorMessage: subprocess installed post-installation script returned error exit status 1
Package: python-pyatspi 1.29.5-0ubuntu1
PackageArchitecture: all
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: at-spi
Tags: lucid
Title: package python-pyatspi 1.29.5-0ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Uname: Linux 2.6.31-14-generic i686

Related branches

Revision history for this message
Matt Zimmerman (mdz) wrote :
Revision history for this message
Matt Zimmerman (mdz) wrote :

Setting up at-spi (1.29.5-0ubuntu1) ...
Installing new version of config file /etc/xdg/autostart/at-spi-registryd.desktop ...

Setting up python-pyatspi (1.29.5-0ubuntu1) ...
Compiling /usr/lib/python2.4/site-packages/pyatspi/__init__.py ...
  File "/usr/lib/python2.4/site-packages/pyatspi/__init__.py", line 42
    finally:
          ^
SyntaxError: invalid syntax

Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

Luke, please take look asap. Thanks.

Changed in at-spi (Ubuntu):
assignee: nobody → Luke Yelavich (themuso)
summary: package python-pyatspi 1.29.5-0ubuntu1 failed to install/upgrade:
- subprocess installed post-installation script returned error exit status
- 1
+ invalid syntax error for python2.4
Changed in at-spi (Ubuntu):
status: New → Confirmed
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

The error above is caused by use of try ... except ... finally instead of try ... try ... except ... finally. The former was introduced in
Python 2.5[0].

[0] - http://docs.python.org/reference/compound_stmts.html#try

Revision history for this message
Daniel Knittl-Frank (knittl) wrote :

should read:

    try:
      try:
        import gconf
        gconfClient = gconf.client_get_default()
        useDbus = gconfClient.get_bool("/desktop/gnome/interface/at-spi-dbus")
      except:
        useDbus = False
    finally:
      del gconfClient
      del gconf

this worked for me, although i don't understand how this occured, default python version on my system is 2.6 -- which already allows try … except … finally

Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Bug 506357] Re: package python-pyatspi 1.29.5-0ubuntu1 failed to install/upgrade: invalid syntax error for python2.4

On Tue, Jan 12, 2010 at 01:02:59PM -0000, Daniel Knittl-Frank wrote:
> should read:
>
> try:
> try:
> import gconf
> gconfClient = gconf.client_get_default()
> useDbus = gconfClient.get_bool("/desktop/gnome/interface/at-spi-dbus")
> except:
> useDbus = False
> finally:
> del gconfClient
> del gconf
>
> this worked for me, although i don't understand how this occured,
> default python version on my system is 2.6 -- which already allows try …
> except … finally

As can be seen in the log excerpt, the error occurred when trying to
byte-compile the module for python 2.4.

--
 - mdz

Revision history for this message
Matt Zimmerman (mdz) wrote :

The workaround for this issue is to remove python2.4 (nothing on my system depended on it).

Revision history for this message
criticalmess (criticalmess) wrote :

Same goes for Amd64, workaround also works on Amd64.

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

This bug was fixed in the package at-spi - 1.29.5-0ubuntu2

---------------
at-spi (1.29.5-0ubuntu2) lucid; urgency=low

  * debian/control:
    - Support python >= 2.5 only. (LP: #506357)
    - Remove python-all-dev as a build dependency.
    - Force python-pyatspi to support 2.5, 2.6 for now, since pycentral
      is setting Python-Version to all for some reason.
 -- Luke Yelavich <email address hidden> Wed, 13 Jan 2010 16:33:51 +1100

Changed in at-spi (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Philip Muškovac (yofel) wrote :

Setting up python-pyatspi (1.29.5-0ubuntu2) ...
Compiling /usr/lib/python2.4/site-packages/pyatspi/__init__.py ...
  File "/usr/lib/python2.4/site-packages/pyatspi/__init__.py", line 42
    finally:
          ^
SyntaxError: invalid syntax

Hm, not quite fixed...

Revision history for this message
Bowmore (bowmore) wrote :

Yes, it's still an issue.
I had to remove python2.4 again and run dpkg --configure -a to resolve it.

Revision history for this message
criticalmess (criticalmess) wrote :

Not fixed, who marked that? There is version 1.29.5-0ubuntu2 what does not fixes the instalaltion issue.
You can workaround the installation issue by uninstalling python2.4 but is dont fix your at-spi registry beeing dead:

$ metacity --replace
(metacity:13261): atk-bridge-WARNING **: AT_SPI_REGISTRY was not started at session startup.
(metacity:13261): atk-bridge-WARNING **: IOR not set.
(metacity:13261): atk-bridge-WARNING **: Could not locate registry

$ synaptic
(synaptic:30608): atk-bridge-WARNING **: AT_SPI_REGISTRY was not started at session startup.
(synaptic:30608): atk-bridge-WARNING **: IOR not set.
(synaptic:30608): atk-bridge-WARNING **: Could not locate registry

Revision history for this message
Michael Vogt (mvo) wrote :

See bug #507842 why this is still a problem. I upload a rebuild against the fixed python-central now.

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.