jkaberg / tvhProxy

An small flask app to help Plex DVR connect with Tvheadend
Other
216 stars 107 forks source link

Error with Version 4.3 #51

Open christianuhlmann opened 6 years ago

christianuhlmann commented 6 years ago

Hi all,

i get these Error with the latest unstable Version 4.3.

(venv) christian@ubuntu:~/tvhProxy$ python tvhProxy.py An error occured: ValueError('No JSON object could be decoded',) [2018-03-19 14:55:53,581] ERROR in app: Exception on /lineup.json [GET] Traceback (most recent call last): File "/home/christian/tvhProxy/venv/local/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "/home/christian/tvhProxy/venv/local/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/christian/tvhProxy/venv/local/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/christian/tvhProxy/venv/local/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/home/christian/tvhProxy/venv/local/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functionsrule.endpoint File "tvhProxy.py", line 54, in lineup for c in _get_channels(): TypeError: 'NoneType' object is not iterable

It seemd to be an change in the JSON API.

Anyone have an Idea to fix this? Downgrad is not possible.

See attached file for more informations http://[TVHEADEND]/api/channel/grid?start=0&limit=999999: api_channel_grid.txt

Thanks & Regards

Christian

Dids commented 6 years ago

Same issue here. Did you get anywhere with this?

lubepi commented 6 years ago

Same here.. would really like to use version 4.3 because of vaapi support.

xorinzor commented 6 years ago

same as #48. It's better to check for existing issues first before creating duplicates.

Dids commented 6 years ago

@xorinzor I still see this even after the "fix" in #48. In fact, the issue is happening before the fix, as it looks like it's unable to get the list of channels in the first place.

Dids commented 6 years ago

Figured it out. It looks like python's HTTP requests are dropping the username:password@ part of the URL, meaning the authentication fails. I worked around this by running tvheadend with the --noacl flag, which disables authentication, then removing the authentication from the tvhproxy URL parameter.

lubepi commented 6 years ago

Thanks! yesterday I found out that I get back a <Response [401]> from the requests.get(url). But I had no time to find a solution.

tdabasinskas commented 6 years ago

Instead of completely disabling ACLs, you might want to set Authentication type to Both plain and digest under Configuration -> Base -> HTTP Server Settings, which should help as well.