mmmmmtasty / SportScanner

Scanner and Metadata Agent for Plex that uses sportdb
101 stars 31 forks source link

Missing Match: TypeError: object of type 'NoneType' has no len() at line 232 #6

Closed rickjtaylor closed 8 years ago

rickjtaylor commented 8 years ago

NBA_2008-04-19_Houston_Rockets_vs_Utah_Jazz.m4v

A manual search finds the proper game. http://www.thesportsdb.com/api/v1/json/1/searchfilename.php?e=NBA_2008-04-19_Houston_Rockets_vs_Utah_Jazz

The log shows the following error:

2015-11-15 13:14:42,394 (700002dbb000) : CRITICAL (runtime:298) - Exception in task thread (most recent call last): File "bundles-release/Framework.bundle-dist/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 296, in _start File "bundles-release/Framework.bundle-dist/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 243, in _exec File "/Users/Plex/Library/Application Support/Plex Media Server/Plug-ins/SportScanner.bundle/Contents/Code/init.py", line 232, in UpdateEpisode for current_event in range(len(season_metadata['events'])): TypeError: object of type 'NoneType' has no len()

mmmmmtasty commented 8 years ago

I had to add zero padding to the season so that the search URL is properly formed. The file you mentioned worked now for me. Please check out the latest copy and try again!

I'm also going to add a bit to the scanner so that it does a filename search before trying all other matching forms.

Let me know if you find anything else.