pybridge doesn't start

Bug #580224 reported by Stefan Istrate
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
pybridge (Debian)
Fix Released
Unknown
pybridge (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: pybridge

When launching pybridge, I am getting the following message: "Error: Twisted Core 2.0.0+ required". I have installed python-twisted and python-twisted-core but pybridge still doesn't work. I am using Ubuntu Lucid.

Related branches

Revision history for this message
Bartek Wilczynski (bartek) wrote :

Confirmed. Pybridge client need twisted 2.5, while lucid installs 10.0.0.

Revision history for this message
Stefan Istrate (stefan-istrate-deactivatedaccount) wrote :

Here is the problem:

if twisted.copyright.version < TWISTED_REQUIRED:
        raise SystemExit, "Error: Twisted Core %s+ required" % TWISTED_REQUIRED

'10.0.0' is less than '2.0.0'.

Revision history for this message
Bartek Wilczynski (bartek) wrote :

Indeed, this patch for /usr/games/pybridge does the trick:
32c32
< TWISTED_REQUIRED = '10.0.0'
---
> TWISTED_REQUIRED = '2.0.0'

Changed in pybridge (Ubuntu):
status: New → Confirmed
Revision history for this message
Michael Banks (michaelbanks) wrote :

Stefan is correct: the string comparison assumes the first character of twisted.copyright.version to be in range '2'..'9'. (In my defence, Twisted was at version 2.x when I wrote that code.)

A quick fix is to comment out the following lines of /usr/games/pybridge (lines 48-50):

# import twisted.copyright
# if twisted.copyright.version < TWISTED_REQUIRED:
# raise SystemExit, "Error: Twisted Core %s+ required" % TWISTED_REQUIRED

For the PyBridge packages in Debian/Ubuntu, the version checking performed by /usr/games/pybridge (lines 27- 67) is unnecessary, since the dependency data is embedded into the .deb files.

Changed in pybridge (Debian):
status: Unknown → New
Revision history for this message
RazTaz (qvovadis) wrote :

I confirm the bug. I'm using Ubuntu 10.04, Kernel Linux 2.6.32-27-generic-pae.

Changed in pybridge (Debian):
status: New → Fix Released
Revision history for this message
LarryE (cppljevans) wrote :

See:

  https://stackoverflow.com/questions/11887762/compare-version-strings-in-python

If you do as that suggested by replacing the comparison with:

  StrictVersion(twisted.copyright.version) < StrictVersion(TWiSTED_REQUIRED)

I think it'll work.

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.