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

The script sometimes fails #23

Open
werrent opened this issue May 27, 2022 · 2 comments
Open

The script sometimes fails #23

werrent opened this issue May 27, 2022 · 2 comments

Comments

@werrent
Copy link

werrent commented May 27, 2022

Hi, I just installed iptv-filter today. I ran into a little problem when I tried to use it

I am not requesting assistance with this. I am only reporting this for your information

I use Ubuntu Linux 18.04, with python3 3.6.9 installed

I ran iptv-filter against some test data that I have, and it processed each file successfully. When it works, it seems to work nicely. I have been trying to write something similar. Your script is much faster and more feature-rich than anything that I have written

After testing your script, I downloaded the latest m3u file from https://satupdates.com/canada-iptv-m3u-playlist

I have gzipped the file and uploaded it. The link is on the next line

canada-270522.m3u.gz

When I try to run iptv-filter with this file, I see this:

iptv-filter -i canada-270522.m3u -o m27e.m3u
Traceback (most recent call last):
File "/home/werrent/.local/bin/iptv-filter", line 8, in
sys.exit(main())
File "/home/werrent/.local/lib/python3.6/site-packages/iptvtools/iptv_filter.py", line 73, in main
playlist.parse()
File "/home/werrent/.local/lib/python3.6/site-packages/iptvtools/models.py", line 68, in parse
self._parse(self.args.inputs)
File "/home/werrent/.local/lib/python3.6/site-packages/iptvtools/models.py", line 137, in _parse
if current_id not in self.id_url:
UnboundLocalError: local variable 'current_id' referenced before assignment

@huxuan
Copy link
Owner

huxuan commented May 28, 2022

Hi @werrent, thanks for the reporting. It is actually a bug for iptvtools. iptvtools is not well tested and it expects to have a valid first line for the m3u. I think you have already find some workarounds. I will keep this issue open until the corresponding problem is fixed. But there is no promise on the ETA. Just let me know if you have any further questions.

@werrent
Copy link
Author

werrent commented May 29, 2022 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