Platforms->Playstation2->Most recent doesn't open

Bug #495058 reported by laura burbaite
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Elisa GameTrailers plugin
Fix Released
Undecided
Unassigned

Bug Description

Steps to reproduce:
1. Launch Moovida.
2. Install new version of plugin" elisa_plugin_gametrailers-0.5.egg"
3. Go to->Videos->GameTrailers->Platforms->Playstation2.
4. Play `Most recent´.

Expected result:
Most recent´plays.

Current result:
Error message: see screen shot.

Revision history for this message
laura burbaite (lburbaite) wrote :

Valid in Linux Ubuntu 9.10 and Windows 7.

Olivier Tilloy (osomon)
summary: - Platforms->Playstation2->Most recent doesn´t play
+ Platforms->Playstation2->Most recent doesn't open
Changed in elisa-plugin-gametrailers:
status: New → Confirmed
Revision history for this message
Olivier Tilloy (osomon) wrote :

I can reliably reproduce. I'm attaching the XML response from the webservice. This is the traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 630, in gotResult
    _deferGenerator(g, deferred)
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 607, in _deferGenerator
    deferred.callback(result)
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 243, in callback
    self._startRunCallbacks(result)
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 312, in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 328, in _runCallbacks
    self.result = callback(self.result, *args, **kw)
  File "build/bdist.linux-x86_64/egg/elisa/plugins/gametrailers/resource_provider.py", line 141, in response_read

  File "/usr/lib/python2.6/xml/dom/minidom.py", line 1928, in parseString
    return expatbuilder.parseString(string)
  File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 940, in parseString
    return builder.parseString(string)
  File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 717, column 97

Parsing is failing at line 717, column 97, which is the "é" character. It shouldn't as the document's encoding is declared as UTF-8. More investigation needed.

Revision history for this message
Martin Janser (mjanser-deactivatedaccount) wrote :

It seems, that the document's encoding is declared as UTF-8, but in fact it is ISO-8859-1. Does the following code make sense for parsing the response?

response = unicode(response, 'iso-8859-1')
dom = minidom.parseString(response)

Revision history for this message
Olivier Tilloy (osomon) wrote :

That won't work. To fix this encoding mess, you'll probably need to do something like this:

   response = response.decode('iso-8859-1').encode('utf-8')

(assuming you are sure the original encoding is iso-8859-1 and the one declared in the document is utf-8).

Changed in elisa-plugin-gametrailers:
status: Confirmed → Fix Released
Revision history for this message
laura burbaite (lburbaite) wrote :

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