djoole/couchpotato.provider.HDO

HDO : UnboundLocalError: local variable 'res' referenced before assignment

giks opened this issue · 5 comments

giks commented

Bonjour, merci pour le taf , cependant le plugin de me retourne aucun film et j'ai un plantage dans la log ....

cf ci dessous.

Steps to reproduce:

  1. ..
  2. ..

Information:

Movie(s) I have this with: ...
Quality of the movie being searched: ...
Providers I use: ...
Version of CouchPotato: git:(sarakha63:CouchPotatoServer master) 6e7544e5 (2015-03-22 19:22:42)
Running on: ...

Logs:

09-03 11:52:56 ERROR [                   hdonly] Failed to parse TMDB API: Traceback (most recent call last):
  File "/usr/local/couchpotatoserver-custom/var/custom_plugins/hdonly/main.py", line 173, in getFrenchTitle
    frTitle = res['title'].lower().replace(':','').replace('  ',' ')
UnboundLocalError: local variable 'res' referenced before assignment 

Bonjour, avec quel titre rencontres tu ce problème?
Il me faudrait les logs en DEBUG de toute la phase de recherche du film.
Le jeu. 3 sept. 2015 à 12:12, giks notifications@github.com a écrit :

Bonjour, merci pour le taf , cependant le plugin de me retourne aucun film
et j'ai un plantage dans la log ....

cf ci dessous.
Steps to reproduce:

  1. ..
  2. ..

Information:

Movie(s) I have this with: ...
Quality of the movie being searched: ...
Providers I use: ...
Version of CouchPotato: git:(sarakha63:CouchPotatoServer master) 6e7544e5
(2015-03-22 19:22:42)
Running on: ...
Logs:

09-03 11:52:56 ERROR [ hdonly] Failed to parse TMDB API: Traceback (most recent call last):
File "/usr/local/couchpotatoserver-custom/var/custom_plugins/hdonly/main.py", line 173, in getFrenchTitle
frTitle = res['title'].lower().replace(':','').replace(' ',' ')
UnboundLocalError: local variable 'res' referenced before assignment


Reply to this email directly or view it on GitHub
#10.

giks commented

Le problème ne survient que sur un seul film : star wars episode VII - le réveil de la force (je pense que c'est liée au nom qui sont le le chiffre 7 est converti en vii)
Pour les autres films ca marche parfaitement bien pour HDO (merci)

Voici les logs en debug :

Information:

Movie(s) I have this with: star wars episode VII
Quality of the movie being searched: BR DISK & 1080p
Providers I use: ...
Version of CouchPotato: git:(sarakha63:CouchPotatoServer master) 6e7544e5 (2015-03-22 19:22:42)
Running on: DSM 5.0 synology

Logs:

09-04 08:09:52 DEBUG [to.core.media._base.media] Changing status for Star Wars, épisode VII : Le Réveil De La Force 
09-04 08:09:52 DEBUG [o.core.notifications.core] Notifying frontend 
09-04 08:09:52 DEBUG [o.core.notifications.core] Done notifying frontend 
09-04 08:09:52  INFO [core.media.movie.searcher] Search for Star Wars, épisode VII : Le Réveil De La Force in BR-Disk ignoring ETA 
09-04 08:09:52 DEBUG [o.core.notifications.core] Getting messages with id: 0a07d3cb-e2c2-4908-812d-4281006b773f 
09-04 08:09:52 DEBUG [o.core.notifications.core] Returning for 0a07d3cb-e2c2-4908-812d-4281006b773f 3 messages 
09-04 08:09:52 DEBUG [                   hdonly] Looking on TMDB for French title of : star wars episode vii le reveil de la force 
09-04 08:09:52 DEBUG [hpotato.core.plugins.base] Waiting for hdonly, 1 seconds 
09-04 08:09:52  INFO [hpotato.core.plugins.base] Opening url: get https://api.themoviedb.org/3/search/movie?api_key=0f3094295d96461eb7a672626c54574d&language=fr&query=star%20wars%20episode%20vii%20le%20reveil%20de%20la%20force, data: [] 
09-04 08:09:53 DEBUG [hpotato.core.plugins.base] Setting cache 8ca6e84480d8da0f460425b6e5b55cde 
09-04 08:09:53 DEBUG [                   hdonly] L'API TMDB a trouvé un titre français => star wars episode vii - le réveil de la force 
09-04 08:09:53 DEBUG [                   hdonly] Searching HD-Only for star wars episode vii le reveil de la force 
09-04 08:09:53  INFO [hpotato.core.plugins.base] Opening url: get https://hd-only.org/ajax.php?action=browse&searchstr=star%20wars%20episode%20vii%20le%20reveil%20de%20la%20force&year=2015, data: [] 
09-04 08:09:53 DEBUG [o.core.notifications.core] Getting messages with id: 0a07d3cb-e2c2-4908-812d-4281006b773f 
09-04 08:09:53 DEBUG [o.core.notifications.core] Returning for 0a07d3cb-e2c2-4908-812d-4281006b773f 3 messages 
09-04 08:09:53 DEBUG [o.core.notifications.core] Getting messages with id: 0a07d3cb-e2c2-4908-812d-4281006b773f 
09-04 08:09:53 DEBUG [o.core.notifications.core] Returning for 0a07d3cb-e2c2-4908-812d-4281006b773f 3 messages 
09-04 08:09:53 DEBUG [o.core.notifications.core] Getting messages with id: 0a07d3cb-e2c2-4908-812d-4281006b773f 
09-04 08:09:53 DEBUG [o.core.notifications.core] Returning for 0a07d3cb-e2c2-4908-812d-4281006b773f 3 messages 
09-04 08:09:53 DEBUG [hpotato.core.plugins.base] Setting cache 28a9f4f0cd3385577a811b93acf12998 
09-04 08:09:53 DEBUG [                   hdonly] Searching HD-Only for star wars episode vii - le réveil de la force 
09-04 08:09:53 DEBUG [hpotato.core.plugins.base] Waiting for hdonly, 1 seconds 
09-04 08:09:54 DEBUG [o.core.notifications.core] Getting messages with id: b4ff3528-a6b7-4fc5-9a6e-159082cacf18 
09-04 08:09:54 DEBUG [o.core.notifications.core] Returning for b4ff3528-a6b7-4fc5-9a6e-159082cacf18 0 messages 
09-04 08:09:54  INFO [hpotato.core.plugins.base] Opening url: get https://hd-only.org/ajax.php?action=browse&searchstr=star%20wars%20episode%20vii%20-%20le%20r%C3%A9veil%20de%20la%20force&year=2015, data: [] 
09-04 08:09:55 DEBUG [hpotato.core.plugins.base] Setting cache 854e4ed45ef0a7bc23ba8173f4ad6982 
09-04 08:09:55 DEBUG [                   hdonly] ******* searchUrl : https://hd-only.org/ajax.php?action=browse&searchstr=star wars episode vii - le réveil de la force&year=2015 
09-04 08:09:55 DEBUG [                   hdonly] ******* frData : 
09-04 08:09:55 DEBUG [                   hdonly] {u'status': u'success', u'response': {u'youMightLike': [], u'results': []}} 
09-04 08:09:55 DEBUG [                   hdonly] No result from HD-Only with star wars episode vii - le réveil de la force or star wars episode vii le reveil de la force 
09-04 08:09:55 DEBUG [                   hdonly] Looking on TMDB for French title of : star wars, épisode vii : le réveil de la force 
09-04 08:09:55  INFO [hpotato.core.plugins.base] Opening url: get https://api.themoviedb.org/3/search/movie?api_key=0f3094295d96461eb7a672626c54574d&language=fr&query=star%20wars,%20%C3%A9pisode%20vii%20:%20le%20r%C3%A9veil%20de%20la%20force, data: [] 
09-04 08:09:55 DEBUG [o.core.notifications.core] Getting messages with id: b4ff3528-a6b7-4fc5-9a6e-159082cacf18 
09-04 08:09:55 DEBUG [o.core.notifications.core] Returning for b4ff3528-a6b7-4fc5-9a6e-159082cacf18 0 messages 
09-04 08:09:55 DEBUG [o.core.notifications.core] Getting messages with id: b4ff3528-a6b7-4fc5-9a6e-159082cacf18 
09-04 08:09:55 DEBUG [o.core.notifications.core] Returning for b4ff3528-a6b7-4fc5-9a6e-159082cacf18 0 messages 
09-04 08:09:55 DEBUG [o.core.notifications.core] Getting messages with id: b4ff3528-a6b7-4fc5-9a6e-159082cacf18 
09-04 08:09:55 DEBUG [o.core.notifications.core] Returning for b4ff3528-a6b7-4fc5-9a6e-159082cacf18 0 messages 
09-04 08:09:55 DEBUG [hpotato.core.plugins.base] Setting cache 78edb2103436e2d8c41f41b871c419d7 
09-04 08:09:55 ERROR [                   hdonly] Failed to parse TMDB API: Traceback (most recent call last):
  File "/usr/local/couchpotatoserver-custom/var/custom_plugins/hdonly/main.py", line 173, in getFrenchTitle
    frTitle = res['title'].lower().replace(':','').replace('  ',' ')
UnboundLocalError: local variable 'res' referenced before assignment 
09-04 08:09:55 DEBUG [                   hdonly] Searching HD-Only for star wars, épisode vii : le réveil de la force 
09-04 08:09:55 DEBUG [hpotato.core.plugins.base] Waiting for hdonly, 1 seconds 
09-04 08:09:56  INFO [hpotato.core.plugins.base] Opening url: get https://hd-only.org/ajax.php?action=browse&searchstr=star%20wars%2C%20%E9pisode%20vii%20%3A%20le%20r%E9veil%20de%20la%20force&year=2015, data: [] 
09-04 08:09:56 DEBUG [o.core.notifications.core] Getting messages with id: b4ff3528-a6b7-4fc5-9a6e-159082cacf18 
09-04 08:09:56 DEBUG [o.core.notifications.core] Returning for b4ff3528-a6b7-4fc5-9a6e-159082cacf18 0 messages 
09-04 08:09:56 DEBUG [hpotato.core.plugins.base] Setting cache c25b2c442c6f4b444de6884c650ea24c 
09-04 08:09:56 DEBUG [                   hdonly] No result from HD-Only with None or star wars, épisode vii : le réveil de la force 
09-04 08:09:56 DEBUG [                   hdonly] Looking on TMDB for French title of : star wars episode vii le reveil de la force 
09-04 08:09:56 DEBUG [                   hdonly] L'API TMDB a trouvé un titre français => star wars episode vii - le réveil de la force 
09-04 08:09:56 DEBUG [                   hdonly] Searching HD-Only for star wars episode vii le reveil de la force 
09-04 08:09:56 DEBUG [                   hdonly] Searching HD-Only for star wars episode vii - le réveil de la force 
09-04 08:09:56 DEBUG [                   hdonly] ******* searchUrl : https://hd-only.org/ajax.php?action=browse&searchstr=star wars episode vii - le réveil de la force&year=2015 
09-04 08:09:56 DEBUG [                   hdonly] ******* frData : 
09-04 08:09:56 DEBUG [                   hdonly] {u'status': u'success', u'response': {u'youMightLike': [], u'results': []}} 
09-04 08:09:56 DEBUG [                   hdonly] No result from HD-Only with star wars episode vii - le réveil de la force or star wars episode vii le reveil de la force 
09-04 08:09:56 DEBUG [                   hdonly] Looking on TMDB for French title of : star wars, épisode vii : le réveil de la force 
09-04 08:09:56 ERROR [                   hdonly] Failed to parse TMDB API: Traceback (most recent call last):
  File "/usr/local/couchpotatoserver-custom/var/custom_plugins/hdonly/main.py", line 173, in getFrenchTitle
    frTitle = res['title'].lower().replace(':','').replace('  ',' ')
UnboundLocalError: local variable 'res' referenced before assignment 
09-04 08:09:56 DEBUG [                   hdonly] Searching HD-Only for star wars, épisode vii : le réveil de la force 

Je pense que c'est la virgule qui met le box. Je m'occupe de ça des que
j'ai 2 min. En même temps c'est pas pressé le film sort à la fin de l'année
^^

Le ven. 4 sept. 2015 à 08:40, giks notifications@github.com a écrit :

Le problème ne survient que sur un seul film : star wars episode VII - le
réveil de la force (je pense que c'est liée au nom qui sont le le chiffre 7
est converti en vii)
Pour les autres films ca marche parfaitement bien pour HDO (merci)

Voici les logs en debug :
Information:

Movie(s) I have this with: star wars episode VII
Quality of the movie being searched: BR DISK & 1080p

Providers I use: ...
Version of CouchPotato: git:(sarakha63:CouchPotatoServer master) 6e7544e5
(2015-03-22 19:22:42)

Running on: DSM 5.0 synology
Logs:

09-04 08:09:52 DEBUG [to.core.media._base.media] Changing status for Star Wars, épisode VII : Le Réveil De La Force
09-04 08:09:52 DEBUG [o.core.notifications.core] Notifying frontend
09-04 08:09:52 DEBUG [o.core.notifications.core] Done notifying frontend
09-04 08:09:52 INFO [core.media.movie.searcher] Search for Star Wars, épisode VII : Le Réveil De La Force in BR-Disk ignoring ETA
09-04 08:09:52 DEBUG [o.core.notifications.core] Getting messages with id: 0a07d3cb-e2c2-4908-812d-4281006b773f
09-04 08:09:52 DEBUG [o.core.notifications.core] Returning for 0a07d3cb-e2c2-4908-812d-4281006b773f 3 messages
09-04 08:09:52 DEBUG [ hdonly] Looking on TMDB for French title of : star wars episode vii le reveil de la force
09-04 08:09:52 DEBUG [hpotato.core.plugins.base] Waiting for hdonly, 1 seconds
09-04 08:09:52 INFO [hpotato.core.plugins.base] Opening url: get https://api.themoviedb.org/3/search/movie?api_key=0f3094295d96461eb7a672626c54574d&language=fr&query=star%20wars%20episode%20vii%20le%20reveil%20de%20la%20force, data: []
09-04 08:09:53 DEBUG [hpotato.core.plugins.base] Setting cache 8ca6e84480d8da0f460425b6e5b55cde
09-04 08:09:53 DEBUG [ hdonly] L'API TMDB a trouvé un titre français => star wars episode vii - le réveil de la force
09-04 08:09:53 DEBUG [ hdonly] Searching HD-Only for star wars episode vii le reveil de la force
09-04 08:09:53 INFO [hpotato.core.plugins.base] Opening url: get https://hd-only.org/ajax.php?action=browse&searchstr=star%20wars%20episode%20vii%20le%20reveil%20de%20la%20force&year=2015, data: []
09-04 08:09:53 DEBUG [o.core.notifications.core] Getting messages with id: 0a07d3cb-e2c2-4908-812d-4281006b773f
09-04 08:09:53 DEBUG [o.core.notifications.core] Returning for 0a07d3cb-e2c2-4908-812d-4281006b773f 3 messages
09-04 08:09:53 DEBUG [o.core.notifications.core] Getting messages with id: 0a07d3cb-e2c2-4908-812d-4281006b773f
09-04 08:09:53 DEBUG [o.core.notifications.core] Returning for 0a07d3cb-e2c2-4908-812d-4281006b773f 3 messages
09-04 08:09:53 DEBUG [o.core.notifications.core] Getting messages with id: 0a07d3cb-e2c2-4908-812d-4281006b773f
09-04 08:09:53 DEBUG [o.core.notifications.core] Returning for 0a07d3cb-e2c2-4908-812d-4281006b773f 3 messages
09-04 08:09:53 DEBUG [hpotato.core.plugins.base] Setting cache 28a9f4f0cd3385577a811b93acf12998
09-04 08:09:53 DEBUG [ hdonly] Searching HD-Only for star wars episode vii - le réveil de la force
09-04 08:09:53 DEBUG [hpotato.core.plugins.base] Waiting for hdonly, 1 seconds
09-04 08:09:54 DEBUG [o.core.notifications.core] Getting messages with id: b4ff3528-a6b7-4fc5-9a6e-159082cacf18
09-04 08:09:54 DEBUG [o.core.notifications.core] Returning for b4ff3528-a6b7-4fc5-9a6e-159082cacf18 0 messages
09-04 08:09:54 INFO [hpotato.core.plugins.base] Opening url: get https://hd-only.org/ajax.php?action=browse&searchstr=star%20wars%20episode%20vii%20-%20le%20r%C3%A9veil%20de%20la%20force&year=2015, data: []
09-04 08:09:55 DEBUG [hpotato.core.plugins.base] Setting cache 854e4ed45ef0a7bc23ba8173f4ad6982
09-04 08:09:55 DEBUG [ hdonly] ******* searchUrl : https://hd-only.org/ajax.php?action=browse&searchstr=star wars episode vii - le réveil de la force&year=2015
09-04 08:09:55 DEBUG [ hdonly] ******* frData :
09-04 08:09:55 DEBUG [ hdonly] {u'status': u'success', u'response': {u'youMightLike': [], u'results': []}}
09-04 08:09:55 DEBUG [ hdonly] No result from HD-Only with star wars episode vii - le réveil de la force or star wars episode vii le reveil de la force
09-04 08:09:55 DEBUG [ hdonly] Looking on TMDB for French title of : star wars, épisode vii : le réveil de la force
09-04 08:09:55 INFO [hpotato.core.plugins.base] Opening url: get https://api.themoviedb.org/3/search/movie?api_key=0f3094295d96461eb7a672626c54574d&language=fr&query=star%20wars,%20%C3%A9pisode%20vii%20:%20le%20r%C3%A9veil%20de%20la%20force, data: []
09-04 08:09:55 DEBUG [o.core.notifications.core] Getting messages with id: b4ff3528-a6b7-4fc5-9a6e-159082cacf18
09-04 08:09:55 DEBUG [o.core.notifications.core] Returning for b4ff3528-a6b7-4fc5-9a6e-159082cacf18 0 messages
09-04 08:09:55 DEBUG [o.core.notifications.core] Getting messages with id: b4ff3528-a6b7-4fc5-9a6e-159082cacf18
09-04 08:09:55 DEBUG [o.core.notifications.core] Returning for b4ff3528-a6b7-4fc5-9a6e-159082cacf18 0 messages
09-04 08:09:55 DEBUG [o.core.notifications.core] Getting messages with id: b4ff3528-a6b7-4fc5-9a6e-159082cacf18
09-04 08:09:55 DEBUG [o.core.notifications.core] Returning for b4ff3528-a6b7-4fc5-9a6e-159082cacf18 0 messages
09-04 08:09:55 DEBUG [hpotato.core.plugins.base] Setting cache 78edb2103436e2d8c41f41b871c419d7
09-04 08:09:55 ERROR [ hdonly] Failed to parse TMDB API: Traceback (most recent call last):
File "/usr/local/couchpotatoserver-custom/var/custom_plugins/hdonly/main.py", line 173, in getFrenchTitle
frTitle = res['title'].lower().replace(':','').replace(' ',' ')
UnboundLocalError: local variable 'res' referenced before assignment
09-04 08:09:55 DEBUG [ hdonly] Searching HD-Only for star wars, épisode vii : le réveil de la force
09-04 08:09:55 DEBUG [hpotato.core.plugins.base] Waiting for hdonly, 1 seconds
09-04 08:09:56 INFO [hpotato.core.plugins.base] Opening url: get https://hd-only.org/ajax.php?action=browse&searchstr=star%20wars%2C%20%E9pisode%20vii%20%3A%20le%20r%E9veil%20de%20la%20force&year=2015, data: []
09-04 08:09:56 DEBUG [o.core.notifications.core] Getting messages with id: b4ff3528-a6b7-4fc5-9a6e-159082cacf18
09-04 08:09:56 DEBUG [o.core.notifications.core] Returning for b4ff3528-a6b7-4fc5-9a6e-159082cacf18 0 messages
09-04 08:09:56 DEBUG [hpotato.core.plugins.base] Setting cache c25b2c442c6f4b444de6884c650ea24c
09-04 08:09:56 DEBUG [ hdonly] No result from HD-Only with None or star wars, épisode vii : le réveil de la force
09-04 08:09:56 DEBUG [ hdonly] Looking on TMDB for French title of : star wars episode vii le reveil de la force
09-04 08:09:56 DEBUG [ hdonly] L'API TMDB a trouvé un titre français => star wars episode vii - le réveil de la force
09-04 08:09:56 DEBUG [ hdonly] Searching HD-Only for star wars episode vii le reveil de la force
09-04 08:09:56 DEBUG [ hdonly] Searching HD-Only for star wars episode vii - le réveil de la force
09-04 08:09:56 DEBUG [ hdonly] ******* searchUrl : https://hd-only.org/ajax.php?action=browse&searchstr=star wars episode vii - le réveil de la force&year=2015
09-04 08:09:56 DEBUG [ hdonly] ******* frData :
09-04 08:09:56 DEBUG [ hdonly] {u'status': u'success', u'response': {u'youMightLike': [], u'results': []}}
09-04 08:09:56 DEBUG [ hdonly] No result from HD-Only with star wars episode vii - le réveil de la force or star wars episode vii le reveil de la force
09-04 08:09:56 DEBUG [ hdonly] Looking on TMDB for French title of : star wars, épisode vii : le réveil de la force
09-04 08:09:56 ERROR [ hdonly] Failed to parse TMDB API: Traceback (most recent call last):
File "/usr/local/couchpotatoserver-custom/var/custom_plugins/hdonly/main.py", line 173, in getFrenchTitle
frTitle = res['title'].lower().replace(':','').replace(' ',' ')
UnboundLocalError: local variable 'res' referenced before assignment
09-04 08:09:56 DEBUG [ hdonly] Searching HD-Only for star wars, épisode vii : le réveil de la force


Reply to this email directly or view it on GitHub
#10 (comment)
.

giks commented

En effet c'est pas urgent :)

Salut,

J'ai enfin eu le temps de regarder ça de plus près.
Je ne reproduis pas le problème car je laisse le titre par défaut dans CP, donc le nom anglais.
Le plugin se charge de faire la conversion de titre anglais vers français.

Dans ton cas, soit c'est toi qui choisis dans les résultats de recherche sous CP le titre FR dans la liste déroulante (mais moi je n'y accède pas..), sois tu utilises le fork de Sakara.
Dans le 1er cas, utilise le nom par défaut et ça fonctionnera.
Dans le 2ème cas, mon plugin n'est compatible qu'avec le CP de ruudburger.