tvhProxy
tvhProxy copied to clipboard
Error 500 on epg.xml - Plex cannot see any channels or tune in
So i've spent quite a few hours figuring this all out and i'm still stuck with the same issues. Below is a few snippets of errors that appear. I have tried with both digest authentication on and off
INFO:root:192.168.1.92 - - [2021-11-26 19:27:23] "GET /lineup.json HTTP/1.1" 500 426 0.025368
ERROR:root:An error occured: %sJSONDecodeError('Expecting value: line 1 column 1 (char 0)')
ERROR:tvhProxy:Exception on /lineup.json [GET]
Traceback (most recent call last):
File "/home/hts/tvhProxy/.venv/lib/python3.9/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/home/hts/tvhProxy/.venv/lib/python3.9/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/hts/tvhProxy/.venv/lib/python3.9/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/home/hts/tvhProxy/.venv/lib/python3.9/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/home/hts/tvhProxy/tvhProxy.py", line 82, in lineup
for c in _get_channels():
TypeError: 'NoneType' object is not iterable
ERROR:tvhProxy:Exception on /epg.xml [GET]
Traceback (most recent call last):
File "/home/hts/tvhProxy/.venv/lib/python3.9/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/home/hts/tvhProxy/.venv/lib/python3.9/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/hts/tvhProxy/.venv/lib/python3.9/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/home/hts/tvhProxy/.venv/lib/python3.9/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/home/hts/tvhProxy/tvhProxy.py", line 108, in epg
return _get_xmltv(), {'Content-Type': 'application/xml'}
File "/home/hts/tvhProxy/tvhProxy.py", line 168, in _get_xmltv
ElementTree.fromstring(requests.get(url, auth=HTTPDigestAuth(config['tvhUser'], config['tvhPassword'])).content))
File "/usr/lib/python3.9/xml/etree/ElementTree.py", line 1347, in XML
parser.feed(text)
xml.etree.ElementTree.ParseError: syntax error: line 1, column 49
Not sure on what else I can do to solve the issue.
Here's the .env
file contents if that helps
TVH_BINDADDR="0.0.0.0"
TVH_BINDPORT=5004
TVH_URL="http://localhost:9981"
TVH_PROXY_URL="http://localhost:5004"
TVH_TUNER_COUNT=1
TVH_WEIGHT=0
TVH_CHUNK_SIZE=1048576
TVH_PROFILE="pass"
TVH_USER="kieran"
TVH_PASSWORD="password"
TVH_PROXY_HOST="localhost"
TVH_PROXY_PORT="5004"
I tried using tvheadend with the --noacl
argument and it seems to have temporarily solved the issue, however it's not that great of a solution.
Hey, how did you fix the first error ?
Using --noacl for tvheadend doesn't change anything for me unfortunately ?
tvhproxy | ERROR:root:An error occured: %sInvalidSchema('No connection adapters were found for \'"http://localhost:9981"/api/channel/grid\'')
tvhproxy | ERROR:tvhProxy:Exception on /lineup.json [GET]
tvhproxy | Traceback (most recent call last):
tvhproxy | File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2077, in wsgi_app
tvhproxy | response = self.full_dispatch_request()
tvhproxy | File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1525, in full_dispatch_request
tvhproxy | rv = self.handle_user_exception(e)
tvhproxy | File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1523, in full_dispatch_request
tvhproxy | rv = self.dispatch_request()
tvhproxy | File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1509, in dispatch_request
tvhproxy | return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
tvhproxy | File "/opt/tvhproxy/./tvhProxy.py", line 82, in lineup
tvhproxy | for c in _get_channels():
tvhproxy | TypeError: 'NoneType' object is not iterable
EDIT: Nevermind, as you can see I added double quotes around the url (baisc docker-compose mistake)
For anyone in the future that finds this: The easy way to fix this issue is to create 2 lines in your .env file
TVH_USER="username"
TVH_PASSWORD="password"