-
Notifications
You must be signed in to change notification settings - Fork 94
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
tv_grab_uk_freeview produces bad XML for some channels #244
Comments
I only see the .conf file not the others? What are you running: |
tv_grab_uk_freeview.tar.gz It was all channels, all days |
edge case when no programmes written in output xml file
'code point' and 'no programmes' xml fixed. |
I sent a full set of cache files. Will one of these contain the offending JSON? If so, is it possible to run a batch file to read them all and see which ones fail? |
Maybe this?
|
Possibly, but I don't have time to do that. (I don't get paid for this :) )
I think that was a control code problem. |
How about this:
Both those have no json in. |
Nice! Good idea.
That seems to be it. Neither of the main Perl JSON packages seem to handle an empty string without croaking |
I've made a change to fix the missing JSON. Please give it a try. |
Output from the cron job, which ran in the early hours of this morning:
New unicode escape sequences seem to appear at any time. It might be better to use Unicode::Escape than keep adding new exceptions. 5xx errors seem to be a regular feature of the Freeview website. Most runs I have done has at least one of these. The script currently seems to abort on the first encounter of one of these errors. The documentation for HTTP::Cache::Transparent has an "approve" interface which can be implemented to say "use the cached data on error". But then the cache timeout would probably want to be governed by a parameter. |
Incoming data contains non-printable ascii characters.
Unicode::Escape only fixes non-ascii characters. |
XMLTV Version?
(Please specify release version or git commit ID)
f84e2eb
XMLTV Component?
(Grabber name or utility)
tv_grab_uk_freeview
Perl Version
5.38.2
Operating System
Ubuntu 24.04 - note: only the grabber is from github. The rest is from the Ubuntu distro.
What happened?
Aborted and produced invalid file(s)
What did you expect to happen?
Run to completion and produce valid file(s)
Did you see any warnings/errors?
(Please paste any warnings/errors, if available)
Code point \u0018 is not a valid character in XML at /usr/share/perl5/XMLTV.pm line 2197.
Code point \u0018 is not a valid character in XML at /usr/share/perl5/XMLTV.pm line 2197.
Code point \u0018 is not a valid character in XML at /usr/share/perl5/XMLTV.pm line 2197.
malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at /usr/share/perl5/XMLTV/Get_nice.pm line 136.
malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at /usr/share/perl5/XMLTV/Get_nice.pm line 136.
Code point \u001C is not a valid character in XML at /usr/share/perl5/XMLTV.pm line 2197.
no programmes found
no programmes found
What steps are needed to reproduce this issue?
(Please provide the full commands you are running)
Please attach your config file below:
(Remember to remove any usernames/passwords)
I have attached the entire output as well as the main config file, and the resulting per-channel xml files. I ran tv_validate_file on each and marked the bad ones as bad:
grab267.xml is bad
grab269.xml is bad
grab272.xml is bad
grab273.xml is bad
grab43.xml is bad
grab707.xml is bad
grab790.xml is bad
Any other information?
(For example, is this a new or intermittent issue?)
This gives more in depth info for problems that other have reported'
Maybe Unicode::Escape could be used to convert \uNNNN to UTF-8?
https://manpages.ubuntu.com/manpages/mantic/man3/Unicode::Escape.3pm.html
I'm not sure what is being received for the bad JSON string. I have 6 errors and 7 bad files, so it's difficult to tell which one corresponds to which, but the errors and the bad files are likely to be in the same order (in the 2 lists above). In any case, it's not many to try to find out wnat is going wrong.
tv_grab_uk_freeview.zip
The text was updated successfully, but these errors were encountered: