szymex / xbmc-finnish-tv

XBMC Video Plugins for playing Finnish television content containers.
GNU General Public License v3.0
31 stars 38 forks source link

Ruutu.fi plugin fails in selAvailability[0].string.strip() if len(selAvailability) > 0 else '0' AttributeError: 'NoneType' object has no attribute 'strip' #74

Open ghost opened 9 years ago

ghost commented 9 years ago

On Ubuntu 14.04.1 LTS & Kodi, ruutu.fi plugin fails with error message you can find here: http://paste.ubuntu.com/9779261/

szymex commented 9 years ago

I committed a potential fix. Can you try it? Just replace ruutu.py in your installation.

ghost commented 9 years ago

Hi, unfortunately fix didn't work. Here are the logs when I used the update: http://paste.ubuntu.com/9788385/

ghost commented 9 years ago

By the way plugin worked on Ubuntu 12.04 but when I upgraded to 14.04 this error started.

I spent some time back then looking into this, but didn't figure it out. I wrote about this on Kodi forum back then, there's what I found when investigating this. To me it seems like the html content that the plugin parses differs from the one I get with a browser. I printed out in the log the HTML and there all content was missing

What plugin gets (no text in a-tag): http://paste.ubuntu.com/9788619/

And what browser gets (title in a-tag): http://paste.ubuntu.com/9788622/

The content (title) seems not to be available for the plugin. I don't know what happens there, but when the plugin tries to parse the title it fails. Don't know if this is an environmental issue on my machine or what. Yle Areena and Katsomo plugins work fine.

szymex commented 9 years ago

Are you sure you have tested correct file, in you logs it tells:

available = selAvailability[0].string.strip() if len(selAvailability) > 0 else '0'

but in a newest file in github that line was changed. You need to manually update ruutu.py from github.

ghost commented 9 years ago

Sorry, I think I uploaded an old log file again or something went wrong as when I redid this for some reason kodi.log wan't generated.

Anyway, after a restart I got the log file and still the plugin fails. Here's the new log file: http://paste.ubuntu.com/9798425/

szymex commented 9 years ago

Try again with updated ruutu.py.

ghost commented 9 years ago

Thanks, some improvement in this version!

The good thing is that in this version the menu option ">> Programs" work. I could watch videos under the programs.

Unfortunately Menu options "Latest", "Most Viewed", " News", etc, all fail.

Log available here: http://paste.ubuntu.com/9839122/

szymex commented 9 years ago

Lets keep trying, try now.

ghost commented 9 years ago

Thanks. Some improvement. Here are the logs: http://paste.ubuntu.com/9865344/

Working:

Not working: