pigskin / kodi-gamepass

NFL Game Pass add-on for Kodi
Other
122 stars 83 forks source link

Error when selecting an archived Game - openeElec (rpi) #75

Closed BaumSchorle closed 10 years ago

BaumSchorle commented 10 years ago

Hey guys,

I made a fresh installation of openElec on my rpi and installed this plugin. Network-Archive and NFL Network Live works perfect, but archived games, don't work.

15:57:05 T:2788160592 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

params = parse_qs(urlparse(url).query) -->End of Python script error report<-- 15:57:12 T:3049256016 NOTICE: CAESinkPi:AddPackets Underrun (delay:0.00 frames:2205)

I debugged a little bit and it seems like this line: params = parse_qs(urlparse(url).query) does not return any results, the params variable is empty. I have no clue where this comes from, since I haven't faced this issue on Raspbmc or on my ubuntu installation.

Where can we start to investigate?

Raffael

aqw commented 10 years ago

Well, that should mean that game_version_ids isn't being set in display_weeks_games() and that's.... odd.

My best guess is that you don't have urllib installed. That would fail to encode (and decode) those params.

---Alex

BaumSchorle commented 10 years ago

I've debugged it and 'url = selectedGame.getProperty('url')' returns a result so, the problem is really that this line 'params = parse_qs(urlparse(url).query)' doesn't return a result, which is really odd :(

hm... If urllib would not be installed, shouldn't I face an issue while importing urllib?

aqw commented 10 years ago

Yeah, urllib should fail due to it not importing... so that's not likely it. Does when you log the result of

url = selectedGame.getProperty('url')

does it include the game versions? (BTW, the naming of that param as url is terrible).

---Alex

BaumSchorle commented 10 years ago

This is whats stored in the url variable: plugin://plugin.video.nfl.gamepass/?url=%7B%27Condensed%27%3A+u%2710150%27%2C+%27Full%27%3A+u%278728%27%2C+%27Live%27%3A+u%2756093%27%7D&name=%5BB%5DMiami+Dolphins%5B%2FB%5D+at+%5BB%5DDallas+Cowboys%5B%2FB%5D

I changed the line to 'params = parse_qs(url)' and then i get this: {'plugin://plugin.video.nfl.gamepass/?url': ["{'Condensed': u'10150', 'Full': u'8728', 'Live': u'56093'}"], 'name': ['[B]Miami Dolphins[/B] at [B]Dallas Cowboys[/B]']}

BaumSchorle commented 10 years ago

Seems like there is a problem with plugin://plugin.video.nfl.gamepass/ There is a last '/' this could cause the problem

aqw commented 10 years ago

Interesting... look like you got it under control for the time being. I'm busy the rest of the night. But I'll take a look at this tomorrow if you still need help by then.

---Alex

BaumSchorle commented 10 years ago

This is what works for me: params = parse_qs(url.split('?')[1])

Don't worry we will see tomorrow how to handle this.

Raffael

aqw commented 10 years ago

I just pushed a patch which hopefully just avoids this issue altogether. Let me know if it works for you. :-)

---Alex

BaumSchorle commented 10 years ago

@Alexqw This works like a charm on my openelec installation, just tested it and was able to play games without any problems.

I will close this!

aqw commented 10 years ago

/Excellent/. This was a cleanup I wanted to do anyway, so that works out nicely. :-)

---Alex