ImportError: No module named ext.reader

Bug #208855 reported by Jithendra Balakrishnan on 2008-03-29
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-soappy (Ubuntu)
Undecided
Unassigned
sonata (Ubuntu)
Undecided
Unassigned
zsi (Ubuntu)
Low
Unassigned

Bug Description

python-zsi's xml functionality is broken, throwing up the following traceback in the case of Sonata's lyric fetching:

Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.5/threading.py", line 446, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/toby/src/sonata/sonata/main.py", line 3046, in info_get_lyrics
    lyrics = self.lyricServer.getSong(artist=urllib.quote(search_artist), song=urllib.quote(search_title))['return']["lyrics"]
  File "/var/lib/python-support/python2.5/ZSI/ServiceProxy.py", line 413, in __call__
    return self.parent()._call(self.__name__, *args, **kwargs)
  File "/var/lib/python-support/python2.5/ZSI/ServiceProxy.py", line 200, in _call
    encodingStyle=callinfo.encodingStyle)
  File "/var/lib/python-support/python2.5/ZSI/client.py", line 427, in Receive
    self.ReceiveSOAP(**kw)
  File "/var/lib/python-support/python2.5/ZSI/client.py", line 397, in ReceiveSOAP
    encodingStyle=kw.get('encodingStyle'))
  File "/var/lib/python-support/python2.5/ZSI/parse.py", line 55, in __init__
    from xml.dom.ext.reader import PyExpat
ImportError: No module named ext.reader

Original description:

Lyrics fetching is not working anymore in Sonata. I've the SoapPy package installed. It used to work fine in Gutsy. I've assigned this bug to both sonata and the SoapPy package as I'm not sure which provides the actual functionality.

This is in hardy and these are the package details.

Ubuntu: Hardy Heron 8.04 Beta
Sonata: 1.4.2-1ubuntu1
python-soappy: 0.12.0-2

description: updated
Paul Natsuo Kishimoto (khaeru) wrote :

If you start sonata from the command-line, you might see "ZSI not found, fetching lyrics support disabled." Sonata seems to have switched from SoapPy to ZSI for lyrics fetching with version 1.3: http://sonata.berlios.de/changelog.html

Synaptic shows that the package "python-zsi" is recommended by "sonata". Once I installed python-zsi, that message disappeared, although the "Info" showed "Lyric fetching failed." for several popular songs.

So, I don't think this affects python-soappy, but I'm not sure if sonata and python-zsi work properly.

Toby Smithe (tsmithe) wrote :

Closing sonata/python-soappy tasks. The bug is in zsi, as it relies on a feature in pyxml that does not exist.

Changed in sonata:
status: New → Invalid
Changed in python-soappy:
status: New → Invalid
Toby Smithe (tsmithe) wrote :

Regard the following traceback for a diagnosis of the bug.

Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.5/threading.py", line 446, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/toby/src/sonata/sonata/main.py", line 3046, in info_get_lyrics
    lyrics = self.lyricServer.getSong(artist=urllib.quote(search_artist), song=urllib.quote(search_title))['return']["lyrics"]
  File "/var/lib/python-support/python2.5/ZSI/ServiceProxy.py", line 413, in __call__
    return self.parent()._call(self.__name__, *args, **kwargs)
  File "/var/lib/python-support/python2.5/ZSI/ServiceProxy.py", line 200, in _call
    encodingStyle=callinfo.encodingStyle)
  File "/var/lib/python-support/python2.5/ZSI/client.py", line 427, in Receive
    self.ReceiveSOAP(**kw)
  File "/var/lib/python-support/python2.5/ZSI/client.py", line 397, in ReceiveSOAP
    encodingStyle=kw.get('encodingStyle'))
  File "/var/lib/python-support/python2.5/ZSI/parse.py", line 55, in __init__
    from xml.dom.ext.reader import PyExpat
ImportError: No module named ext.reader

Changed in zsi:
importance: Undecided → Low
status: New → Triaged
description: updated
wdog (wdog) wrote :

sonata fetch lyrics upgrading zsi to version 2.1

get file ZSI-2.1-a1.tar.gz from http://pywebsvcs.sourceforge.net/
then recompile sonata 1.5.1 and everything works

bp (badpazzword) wrote :

This problem is still present in Intrepid.

Mikhail (mikhail.kalkov) wrote :

The problem is present in Ubuntu Hardy with the following configuration: sonata 1.4.2-1ubuntu1 and python-zsi 2.0-2ubuntu4.

However, there is a temporary workaround, which is discussed here:
https://lists.berlios.de/pipermail/sonata-users/2008-April/000635.html
https://lists.berlios.de/pipermail/sonata-users/2008-April/000641.html

In short, one could edit /usr/share/pyshared/sonata.py and add a line
sys.path.append('/usr/lib/python2.5/site-packages/oldxml')
just after the first import statement. The ext.reader module is a part of PyExpat, which could be found under that path.

Mikhail (mikhail.kalkov) wrote :

Given that according to the comment from wdog the bug is fixed in ZSI 2.1, but it is still not in ubuntu repositories, I propose to append a similair line to the current 2.0 version of python-zsi package so that one wouldn't have to patch all the programs relying on this library. This suggestion is also discussed here: https://lists.berlios.de/pipermail/sonata-users/2008-April/000635.html After a switch to 2.1 version, this patch could be discarded.

P.S. Sorry for a little bit spamming those, who are notified of bugs here and in sonata.

nyal (lyle-netcourrier) wrote :

I have the same problem with python2.5 and ZSI package (Ubuntu Hardy).

My tests:

First, i have added the line "sys.path.append('/usr/lib/python2.5/site-packages/oldxml')" in my program. It doesn't work because the package name is '_xmlplus' (/usr/lib/python2.5/site-packages/oldxml/_xmlplus/) and not 'xml'.

Next, i have try the command :
# ln -s /usr/lib/python2.5/site-packages/oldxml/_xmlplus/ /usr/lib/python2.5/site-packages/xml
But it doesn't work too because python find the built-in python xml package "/usr/lib/python2.5/xml" before.

So, i can't use python-zsi package. however with python-xml and 'ZSI-2.1-a1.tar.gz', it works well.

nyal (lyle-netcourrier) wrote :

Erratum : 'ZSI-2.1-a1.tar.gz' doesn't need python-xml anymore.

Change for 2.1.0_a1 released 31-Oct-2007:
    - No PyXML Dependency, use minidom by default (much faster)
    - samples/WSGI, server and client examples using python wsgi and twisted.web2.wsgi

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers