Closed Kallb123 closed 2 years ago
It's probably something to do with my setup with ubuntu 14.04 and python 2.7.6. It doesn't properly support ssl.
I am not the dev of this code, but I am a developer and I have just started trying to use this plugin, so I'll try to help you out.
The plugin is setup to call http. The URL works (http://www.thesportsdb.com/api/v1/json/8123456712556/all_leagues.php), so there must be some connection issue on your end. No need for https.
The log shows that it attempts to call that URL but fails ('Requesting...', 'SS: Could not retrieve shows...') and since there are no shows and the code doesn't throw an exception it tries to look at the 'potential_leagues' variable which doesn't exist since the initial lookup failed.
Just focus on the connection between your box and thesportsdb. Once you get that sorted it should work fine. Good luck 👍
It's definitely a connection issue between me and thesportsdb. I'm on Ubuntu 14.04 and the version of python installed doesn't support modern SSL. I haven't managed to figure out a virtual environment or updated the packages, it's going to be a while before I can update ubuntu to 16.04 or something.
I wonder if it'd work if I could use python 3?
I managed to install anaconda, so I have an up to date python install in a new directory. I can now connect and communicate with thesportsdb, so I just need to figure out how to get plex to use this new version of python.
I solved this problem after being directed to another plex plugin. Copying what's done here: https://github.com/piplongrun/muvio.bundle/tree/master/Contents/Libraries/Shared
I put those libraries into the SportScanner folder (in the same structure) and them imported them into the init.py. I then switched the code to use the requests library and now I don't have issues with SSL certificates!
@Kallb123 could you share a repo with your diff?
@martin-juul I forked and made a pull request including the libraries and changes to the init file:
https://github.com/mmmmmtasty/SportScanner/pull/24
Like I said, it wasn't my idea, just copied what has already been done elsewhere into this repo.
This has been fixed, can @mmmmmtasty or @Kallb123 close it?
I created a library and NHL folder, but Plex can't match it to thesportsdb league. I have the following in logs:
I tried to curl the url and that failed, so I noticed they now use https, which will curl properly. I changed the url in the code, but it didn't help unfortunately. Not sure why it can't retrieve shows from the site, it works via curl or browser.