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

Bug #506357 reported by Matt Zimmerman on 2010-01-12
64
This bug affects 12 people
Affects Status Importance Assigned to Milestone
at-spi (Ubuntu)
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

Matt Zimmerman (mdz) wrote :
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

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
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

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

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

Matt Zimmerman (mdz) wrote :

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

criticalmess (criticalmess) wrote :

Same goes for Amd64, workaround also works on Amd64.

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
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...

Bowmore (bowmore) wrote :

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

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

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  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers