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

Exception: Invalid JTV format #4

Closed
Shporterator opened this issue Mar 4, 2019 · 4 comments
Closed

Exception: Invalid JTV format #4

Shporterator opened this issue Mar 4, 2019 · 4 comments

Comments

@Shporterator
Copy link

@Shporterator Shporterator commented Mar 4, 2019

http://dkt.iptvportal.ru/jtv.zip

Traceback (most recent call last):
File "jtv2xmltv.py", line 119, in
main()
File "jtv2xmltv.py", line 115, in main
convert_jtv_to_xmltv(jtv_filename, xmltv_filename, epg_timezone=tz_format)
File "jtv2xmltv.py", line 73, in convert_jtv_to_xmltv
channel_titles = parse_titles(titles)
File "jtv2xmltv.py", line 19, in parse_titles
raise Exception('Invalid JTV format')
Exception: Invalid JTV format

@tataranovich

This comment has been minimized.

Copy link
Owner

@tataranovich tataranovich commented Mar 11, 2019

Provided archive is not a valid JTV data source.

According to JTV standard description every pdt file should start with "JTV 3.x TV Program Data" string followed by three symbols with "0x0A" code. But your archive have pdt files where "JTV 3.x TV Program Data" string followed by three "0xA0" symbols instead of "0x0A".

@tataranovich

This comment has been minimized.

Copy link
Owner

@tataranovich tataranovich commented Nov 16, 2019

I've added support for alternative JTV header in v0.2.1.

@Shporterator

This comment has been minimized.

Copy link
Author

@Shporterator Shporterator commented Nov 16, 2019

Весёлые истории РёР
encoding epg is broken

@tataranovich

This comment has been minimized.

Copy link
Owner

@tataranovich tataranovich commented Nov 16, 2019

Which python version do you use? I tested on Debian Buster using python 3.7.3 and http://dkt.iptvportal.ru/jtv.zip converted without issues.

wget http://dkt.iptvportal.ru/jtv.zip
jtv2xmltv -i jtv.zip -o xmltv.xml -e UTF-8
wget https://raw.githubusercontent.com/XMLTV/xmltv/master/xmltv.dtd
xmllint --noout --dtdvalid xmltv.dtd xmltv.xml

The same result with python 2.7.16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.