Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error runing from install #1

Closed
halfagascan opened this issue Jan 24, 2021 · 8 comments
Closed

error runing from install #1

halfagascan opened this issue Jan 24, 2021 · 8 comments

Comments

@halfagascan
Copy link

Debian Buster updated.
Linux deb 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux
Installed per your instructions.
run per your instruction.

Running with the installed version:
python3 manage.py runserver 0:8000 --noreload
24/Jan/2021 08:46:21; root] /home/XXXX/iptv-filter/iptv-filter/iptv_updater/iptv_updater.py:33 in update_m3u_scheduled -- Next M3U Load scheduled for 2021-01-25 04:00:00+00:00
24/Jan/2021 08:46:21; root] /home/XXXX/iptv-filter/iptv-filter/iptv_updater/iptv_updater.py:45 in update_epg_scheduled -- Next EPG Load scheduled for 2021-01-24 14:30:00+00:00
24/Jan/2021 08:46:21; root] /home/XXXX/iptv-filter/iptv-filter/iptv_updater/iptv_updater.py:56 in _retrieve -- Retrieving fresh m3u file from http://XXXXX.XXXX.net:111/get.php?username=XXXXXX&password=XXXXXX&type=m3u_plus&output=ts
Performing system checks...

System check identified no issues (0 silenced).
January 24, 2021 - 08:46:21
Django version 3.1.5, using settings 'project.settings'
Starting development server at http://0:8000/
Quit the server with CONTROL-C.
24/Jan/2021 08:46:23; root] /home/XXXX/iptv-filter/iptv-filter/iptv_updater/iptv_updater.py:63 in _retrieve -- Received fresh m3u file, size 752785
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/home/XXXX/iptv-filter/iptv-filter/iptv_updater/iptv_updater.py", line 15, in update_all
update_m3u()
File "/home/XXXX/iptv-filter/iptv-filter/iptv_updater/iptv_updater.py", line 20, in update_m3u
_update_tables('m3u')
File "/usr/local/lib/python3.9/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/home/XXXX/iptv-filter/iptv-filter/iptv_updater/iptv_updater.py", line 95, in _update_tables
pc.stream_url = line
UnboundLocalError: local variable 'pc' referenced before assignment
^C^CException ignored in: <module 'threading' from '/usr/local/lib/python3.9/threading.py'>
Traceback (most recent call last):
File "/usr/local/lib/python3.9/threading.py", line 1428, in _shutdown
lock.acquire()
KeyboardInterrupt:

While running, I am able to see web server at localhost:8000, nothing populated.

Running in Docker:
docker-compose up
Starting iptv-filter_web_1 ... done
Attaching to iptv-filter_web_1
web_1 | 24/Jan/2021 08:02:18; root] /code/iptv_filter/apps.py:27 in ready -- Startup - Setting M3U URL as per environment variable
web_1 | 24/Jan/2021 08:02:18; root] /code/iptv_filter/apps.py:32 in ready -- Startup - Setting EPG URL as per environment variable
web_1 | 24/Jan/2021 08:02:18; root] /code/iptv_updater/iptv_updater.py:33 in update_m3u_scheduled -- Next M3U Load scheduled for 2021-01-25 04:00:00+00:00
web_1 | 24/Jan/2021 08:02:18; root] /code/iptv_updater/iptv_updater.py:45 in update_epg_scheduled -- Next EPG Load scheduled for 2021-01-24 14:30:00+00:00
web_1 | 24/Jan/2021 08:02:18; root] /code/iptv_updater/iptv_updater.py:56 in _retrieve -- Retrieving fresh m3u file from "http://XXXXX.XXX.net:111/get.php?username=XXXX&password=XXXXX&type=m3u_plus&output=ts"
web_1 | Exception in thread Thread-1:
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.9/threading.py", line 954, in _bootstrap_inner
web_1 | self.run()
web_1 | File "/usr/local/lib/python3.9/threading.py", line 892, in run
web_1 | self._target(*self._args, **self._kwargs)
web_1 | File "/code/iptv_updater/iptv_updater.py", line 15, in update_all
web_1 | update_m3u()
web_1 | File "/code/iptv_updater/iptv_updater.py", line 19, in update_m3u
web_1 | _retrieve('m3u')
web_1 | File "/code/iptv_updater/iptv_updater.py", line 57, in _retrieve
web_1 | r = requests.get(url)
web_1 | File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 76, in get
web_1 | return request('get', url, params=params, **kwargs)
web_1 | File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 61, in request
web_1 | return session.request(method=method, url=url, **kwargs)
web_1 | File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
web_1 | resp = self.send(prep, **send_kwargs)
web_1 | File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 649, in send
web_1 | adapter = self.get_adapter(url=request.url)
web_1 | File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 742, in get_adapter
web_1 | raise InvalidSchema("No connection adapters were found for {!r}".format(url))
web_1 | requests.exceptions.InvalidSchema: No connection adapters were found for '"http://XXXXX.XXX.net:XXX/get.php?username=XXXX&password=XXXXX&type=m3u_plus&output=ts"'
web_1 | Performing system checks...
web_1 |
web_1 | System check identified no issues (0 silenced).
web_1 | January 24, 2021 - 08:02:18
web_1 | Django version 3.1.5, using settings 'project.settings'
web_1 | Starting development server at http://0:8000/
web_1 | Quit the server with CONTROL-C.
^CGracefully stopping... (press Ctrl+C again to force)
Stopping iptv-filter_web_1 ...
Killing iptv-filter_web_1 ... done

Again, I am able to see the webpage, nothing populated
Thanks

@cmcconomy
Copy link
Owner

Interesting - from looking at this section of code I am assuming that for each line, it's an #EXTINF line shaped exactly like:
#EXTINF:-1 tvg-id="(.*?)" tvg-name="(.*?)" tvg-logo="(.*?)" group-title="(.*?)",(.*?)
always followed by a url, starting with http on the line.

I'd like to see your M3U file so I can serve a wider variety of M3U sources.
Could you please paste the first 10 lines or so of your M3U file (of course, obscuring your stream URLs)

@halfagascan
Copy link
Author

halfagascan commented Jan 24, 2021 via email

@cmcconomy
Copy link
Owner

I can see the problem; here is the match template right now:
#EXTINF:-1 tvg-id="(.*?)" tvg-name="(.*?)" tvg-logo="(.*?)" group-title="(.*?)",(.*?)
Here is your instance:
#EXTINF:-1 tvg-ID="fox25wfxt.us" tvg-name="FOX EAST" tvg-logo="http://provider.com/logos/FOX.png" group-title="NETWORK TV",FOX EAST

the difference being my tvg-id to your tvg-ID.
I've just pushed a change to the repo - sync and try again!

@halfagascan
Copy link
Author

halfagascan commented Jan 24, 2021 via email

@cmcconomy
Copy link
Owner

Yes, you can change this timezone to the appropriate TZ for you.
I don't currently have a setting to adjust refresh times, though I do want to build an admin panel for this kind of thing. Consider this an early alpha preview :)

Channels from m3u without a tvg-id will be unable to be associated to a tvguide entry from any xmltv, nothing that can be done there - it's an upstream data problem.

The point of selecting/deselecting is to build the exact channelset you want in the downstream IPTV app, so it does "show/hide" as per selection. If you mean show/hide from the web view, nothing planned right now, I'm relying on the table filtering capabilities to drill down to channels I care about.

Out of curiosity how did you find this project? I'm glad to see someone else may make use of it.

@halfagascan
Copy link
Author

halfagascan commented Jan 24, 2021 via email

@cmcconomy
Copy link
Owner

not obvious but you can hover over the riht side of a column to hit a 'hamburger' icon and filter.

I'm going to close this now.

@halfagascan
Copy link
Author

halfagascan commented Jan 24, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants