Allocine plugin do not populate the fields

Bug #1250013 reported by Maxime DOYEN
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Griffith
Fix Committed
Medium
Michael

Bug Description

following bug #663709
After
- update from svn
- changing the user-agent for the call

to reproduce
- launch from console with --debug (griffith --degub)
- select the allocine plugin
- seach for 'barbarella' in the original title
- select the one from 1968
=> nothing append

the console output is below.
Json strea returned seems correct
I added a print url into movie.py in the urlretrieve(), soyou have the http get call
I cannot help anymore, as python is still weird to me ^^

http://api.allocine.fr/rest/v3/movie?partner=100043982026&format=json&profile=large&code=35177&sed=20131111&sig=iFJyq92lYSfWC%2B%2BT2Oq2iCDlqOE%3D
2013-11-11T10:51:10: E: Griffith(movie:304):
Traceback (most recent call last):
  File "/usr/share/griffith/lib/movie.py", line 254, in parse_movie
    self.initialize()
  File "/usr/share/griffith/lib/plugins/movie/PluginMovieAllocine.py", line 62, in initialize
    self.movie = json.JSONDecoder().decode(self.page)['movie']
  File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 389, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
TypeError: expected string or buffer
Traceback (most recent call last):
  File "/usr/bin/griffith", line 1415, in on_results_select_press_event
    return self._resultswin_process(selected_key)
  File "/usr/bin/griffith", line 272, in populate_dialog_with_results
    add.populate_with_results(self)
  File "/usr/share/griffith/lib/add.py", line 191, in populate_with_results
    w['runtime'].set_value(int(self.movie.runtime))
TypeError: int() argument must be a string or a number, not 'NoneType'

Maxime DOYEN (mdoyen)
description: updated
description: updated
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

Ok fixed it. Don't know if it's the right way, but it works.

Into the file PluginMovieAllocine.py at line 59/60

        return movie.Movie.open_page(self, parent_window, url)

change by

       self.page = movie.Movie.open_page(self, parent_window, url)
        return self.page

Revision history for this message
Michael (mikej06) wrote :

Committed your fix with rev. 1655
Thanks a lot for your work.

Changed in griffith:
assignee: nobody → Michael (mikej06)
importance: Undecided → Medium
milestone: none → 0.13.1
status: New → Fix Committed
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.