Closed torvitas closed 5 years ago
I'm not seeing this error using the latest commit 6208fe0e697825b49689b2f83e09d0b6d1144e98
What are the steps to reproduce?
I just realized that this is related to https://github.com/rembo10/headphones/issues/3172. If you add a trailing slash to the newznab url and click on search, new or want on an album the request results in the internal server error.
@doucheymcdoucherson can you have a look at https://github.com/rembo10/headphones/blob/master/headphones/searcher.py#L491 and https://github.com/rembo10/headphones/blob/master/headphones/searcher.py#L443, result[]
is a list element and the list may not exist?
result[3]
is a list item for the provider
which should always exist as far as I can tell?
I could change the reference of result[3] ==
to provider ==
in order to avoid referencing the list.
From @torvitas' description, this only occurs when there is a trailing slash on the newznab url? @torvitas can you confirm?
I am not yet sure but the error seems to trigger on any empty result and a trailing slash on the newznab url leads to always empty results.
Silently failing for me and appears to be causing a few issues, have taken the code out for now
Hi, one of the latest merged pull requests is causing a referenced before assignment error.
https://github.com/rembo10/headphones/pull/3160/files#diff-218eb437f645e77a753a988f6810cf6bR491
This is the commit: 81486d2cd2c61877f5b0a458dd6978f913b05eca
https://github.com/rembo10/headphones/blob/6208fe0e697825b49689b2f83e09d0b6d1144e98/headphones/searcher.py#L486-L493