unable to start if wxpython default install is < 2.8

Bug #394394 reported by Sergio Daroca
34
This bug affects 5 people
Affects Status Importance Assigned to Milestone
wxBanker
Fix Released
Medium
Unassigned
wxbanker (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Hi ! The program looks great, but I can't open it !!!
In wxBanker 0.4.1.0 (jaunty)
running from the menu does nothing, and running from terminal

~$ python /usr/share/pyshared/wxbanker/wxbanker.py
or
~$ python2.6 /usr/share/pyshared/wxbanker/wxbanker.py
or
~$ python2.5 /usr/share/pyshared/wxbanker/wxbanker.py

I get this:

Traceback (most recent call last):
  File "/usr/share/pyshared/wxbanker/wxbanker.py", line 24, in <module>
    import wx, wx.aui
ImportError: No module named aui

I have python-wxgtk2.8 version 2.8.9.1-0ubuntu6 (jaunty) installed, and I saw on the comments in

http://mrooney.blogspot.com/2009/04/wxbanker-05-rc-available-for-testing.html

that uninstalling python-wxgtk2.6 might do it, but I need it for other programs...

Running on python command line

import wx; wx.version()

traces back:

File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'version'

I'm stuck...

Revision history for this message
Michael Rooney (mrooney) wrote :

Thanks Sergio, I'll have to figure out how to specify wx 2.8. Which other programs need 2.6? It might just be that their dependencies are out of date and work fine on 2.8.

There must be some easy way to solve this! I thought maybe there was a command to swap which wx version is default, I'll try to find it.

Changed in wxbanker:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Karel Kolman (kolmis) wrote :
Revision history for this message
Michael Rooney (mrooney) wrote :

Thanks Karel, I was just looking at that as well. Sergio, running python from a terminal and doing "import wx; wx" should output the directory of wxPython, like "<module 'wx' from '/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/__init__.pyc'>". I assume you see wx-2.6 there?

Perhaps on my side I need to do an "import wxversion; wxversion.select("2.8")". Can you try adding that line above the import wx, wx.aui line and seeing if that addresses the issue? If so I can fix this in the next release!

Revision history for this message
Sergio Daroca (sergio-daroca) wrote :

It Worked !!!
Great ! Nice job !

just added the line:

import wxversion; wxversion.select("2.8")

above the import wx, wx.aui line as you said.

Also Kwrite complained there was no encoding info on the file and offered to add this:

# -*- coding: utf-8 -*-

Added it and hit the wxBanker menu entry and the program opens nice and sweet :)

Just for the record, I use fontypython and svn-workbench, both depend on wx 2.6
Good job !

Revision history for this message
Michael Rooney (mrooney) wrote :

Okay, this should be fixed in 0.6. I've hopefully fixed this in a robust way that won't cause any regressions: http://bazaar.launchpad.net/~mrooney/wxbanker/trunk/revision/236#wxbanker.py

Changed in wxbanker:
milestone: none → 0.6
status: Confirmed → Fix Committed
summary: - ImportError: No module named aui
+ unable to start if wxpython default install is < 2.8
Revision history for this message
Michael Rooney (mrooney) wrote :

Okay, this has shown up twice in Karmic unfortunately. Attached is the upstream patch to fix this, I will see if I can get this into Karmic somehow.

If you are affected by it now, edit the file /usr/share/pyshared/wxbanker/wxbanker.py and insert the line:

    import wxversion; wxversion.ensureMinimal("2.8")

right before the "import wx, wx.aui" line.

Changed in wxbanker (Ubuntu):
status: New → Triaged
Revision history for this message
Michael Rooney (mrooney) wrote :

Hi U-U-S! I'm the upstream author, and attached is a debdiff against the current version in Karmic which applies the upstream patch which is confirmed to fix the issue. Let me know if there is anything I can do, thanks for all your work!

Revision history for this message
Scott Kitterman (kitterman) wrote :

Uploaded. Thank you for your contribution to Ubuntu.

Changed in wxbanker (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wxbanker - 0.5.0.0-0ubuntu2

---------------
wxbanker (0.5.0.0-0ubuntu2) karmic; urgency=low

  * apply upstream patch to fix running when default wx version is < 2.8
    (LP: #394394)

 -- Michael Rooney <email address hidden> Sun, 25 Oct 2009 23:27:50 -0700

Changed in wxbanker (Ubuntu):
status: Fix Committed → Fix Released
Michael Rooney (mrooney)
Changed in wxbanker:
status: Fix Committed → 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.