wammu cannot import wx (doesn't start)

Bug #120175 reported by Gioele Barabucci
6
Affects Status Importance Assigned to Milestone
wammu (Ubuntu)
New
Undecided
Unassigned

Bug Description

This is what happens when I try to start wammu

  $ wammu
  'import site' failed; use -v for traceback
  Traceback (most recent call last):
    File "/usr/bin/wammu", line 77, in <module>
      import Wammu.App
   File "/usr/lib/python2.5/site-packages/Wammu/App.py", line 25, in <module>
      import wx
  ImportError: No module named wx

I have the following wx-related packages installed

  $ dpkg -l | grep wx
  ii libwxbase2.6-0 2.6.3.2.1.5ubuntu6
  ii libwxbase2.8-0 2.8.1.1-0ubuntu4
  ii libwxgtk2.6-0 2.6.3.2.1.5ubuntu6
  ii libwxgtk2.8-0 2.8.1.1-0ubuntu4
  ii python-wxgtk2.6 2.6.3.2.1.5ubuntu6
  ii python-wxgtk2.8 2.8.1.1-0ubuntu4
  ii python-wxversion 2.6.3.2.1.5ubuntu6

Revision history for this message
Tom Mortimer-Jones (tom-morty) wrote :

Thanks for the bug report.

Can you tell me if /usr/lib/python2.5/site-packages/wx.pth exists?

If it does and it is a symbolic link to /etc/alternatives/wx.pth can you tell me where /etc/alternatives/wx.pth is a symbolic link to?

Revision history for this message
Gioele Barabucci (gioele) wrote :

It exists /etc/alternatives/wx.pth is a symlink to /usr/lib/wx/python/wx2.6.pth

$ hexdump -C /usr/lib/wx/python/wx2.6.pth
00000000 77 78 2d 32 2e 36 2d 67 74 6b 32 2d 75 6e 69 63 |wx-2.6-gtk2-unic|
00000010 6f 64 65 |ode|

Revision history for this message
Tom Mortimer-Jones (tom-morty) wrote :

Thanks for checking those things. It all looks OK so far.

Can you tell me if the directory /usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx is present on your system?

Does this command cause the same ImportError as when running wammu?

$ python -c "import wx"

Is '/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/' included in the list of locations printed out by this command?

$ python -c "import sys; print sys.path"

Revision history for this message
Gioele Barabucci (gioele) wrote :

> /usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx
> is present on your system?
yes

> Does this command cause the same ImportError as when running wammu?
> $ python -c "import wx"
yes

> Is '/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/' included
> in the list of locations printed out by this command?
> $ python -c "import sys; print sys.path"
no, it is not included. I reinstalled that package but it didn't change anything.

Revision history for this message
Brian Murray (brian-murray) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Thanks in advance.

Revision history for this message
Gioele Barabucci (gioele) wrote :

Everything is solved with the wammu release present in Gutsy.

Revision history for this message
Brian Murray (brian-murray) wrote :

This bug report is being closed due to your last comment regarding this being fixed with an upgrade to Gutsy. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the drop down box. You can learn more about bug statuses at http://wiki.ubuntu.com/Bugs/Status . Thank you again for taking the time to report this bug and helping to make Ubuntu better. Feel free to submit any future bugs you may find.

Revision history for this message
Chow Loong Jin (hyperair) wrote :

I'm reopening the bug because it happens again in Ubuntu Hardy.

Changed in wammu:
status: Fix Released → New
Revision history for this message
Chow Loong Jin (hyperair) wrote :

Creating the wx.pth file linking to /etc/alternatives/wx.pth in /usr/lib/python-2.5/site-packages does the trick, but it wasn't there to begin with.

Revision history for this message
MiguelGL (miguelgl) wrote :

Can confirm this symlink fixes the problem under Ubuntu Gutsy amd64. I was also experiencing it although a previous comment states a Gutsy upgrade fixed it. It was not so for me.

Revision history for this message
Janne Jokitalo (astraljava) wrote :

That's strange, as Gutsy's version of wammu has a dependency, which ought to have created it:

jaska@bowmore:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=7.10
DISTRIB_CODENAME=gutsy
DISTRIB_DESCRIPTION="Ubuntu 7.10"

jaska@bowmore:~$ ls -l /etc/alternatives/wx.pth
lrwxrwxrwx 1 root root 28 2007-10-17 15:20 /etc/alternatives/wx.pth -> /usr/lib/wx/python/wx2.6.pth

jaska@bowmore:~$ dpkg -S /usr/lib/wx/python/wx2.6.pth
python-wxgtk2.6: /usr/lib/wx/python/wx2.6.pth
jaska@bowmore:~$ apt-cache show wammu
Package: wammu
[...]
Depends: python, python-central (>= 0.5.8), python-gammu (>= 0.21), python-wxgtk2.6

Changed in wammu:
assignee: brian-murray → nobody
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.