XML file structure causes errors

Antwort erstellen


Diese Frage dient dazu, das automatisierte Versenden von Formularen durch Spam-Bots zu verhindern.

BBCode ist eingeschaltet
[img] ist eingeschaltet
[url] ist eingeschaltet
Smileys sind ausgeschaltet

Die letzten Beiträge des Themas

Ich habe die Datenschutzerklärung gelesen und bin damit einverstanden.

   

Ansicht erweitern Die letzten Beiträge des Themas: XML file structure causes errors

von ajocius1 » 20 Mär 2007, 12:34

You did it m8 :D

After adding _lt t to channel names in htm file, file names in raw directory changed. Instead of de they now contain lt. And data manager has created many files in prepared directory (for each channel and each day as it is supposed to). I have done this correction earlier, but datamanager was still not running (because of the other issues). Since I didn't see any improvement then, I took this change out of "must be changed" list...

Now I need to play again from scratch to figure out what minimum level of adjustments are needed and how to automate those changes (any ideas?). I need to replace channel names to channels names _lt and also replace "<previously-shown />" with nothing. I will see if ratings are creating problems, if so, I need to replace few other lines with nothing.

I will try to upload channel info into TVBrowser once I am at home, to complete experiment.

von Jo » 20 Mär 2007, 10:55

Maybe I've got an idea: You wrote the XML file has the structure:
<programme start="20070314063500" channel="LNK"> The channel has no country ID as in "<programme channel="test24_ch" start="200407101100">"
You wrote that the files in the raw directory have names like "2007-03-19_de_LNK_raw_full.prog.txt".
That means that the country ID "de" for Germany is added there. If you wrote in the config file x_channellist.txt an other country ID than "de" (for example "lt"), the datamanager will search for files like "2007-03-19_lt_LNK..." in the raw directory and will not find any program data.

von Jo » 20 Mär 2007, 10:39

What messages do you get from datamanager before those you have posted above?

von ajocius1 » 20 Mär 2007, 10:15

Hello,

Removed all the ratings from xml. Still get the same message once I run datamanager:
Fine: Updating the channel list
Fine: Updating the mirror list
writing summery to the file...
get the mimimum start date...
write frames...
frameCount: 0
minStartDaysSince1970: 2147483647
done.

I can not compare it with the days where it works, since I only get four files in prepared directory and none of them are actual listings. Those are files like <group name>_channellist.gz; <group name>_info; <group name>_mirrorlist.gz and <group name>_summary.gz

von Jo » 19 Mär 2007, 22:57

ajocius1 hat geschrieben:Is there any clever way to debug the program without much knowledge about java?
You can add some "System.out.println(variable);"
I don't know what's wrong. I don't really know how XmlTvPDS works. Maybe you can find out what's different on those days that work. Or try it without the rating element. Even if it says "WARNING" it might be an error.

von ajocius1 » 19 Mär 2007, 16:30

dayprogramfiletranslator raw did not give any errors. The output files seems to be fine as far as I understand. Each file has date and channel name in it's name. Example "2007-03-19_de_LNK_raw_full.prog.txt". Text inside looks like:

Version: 1

Program ID: 0
start time: 6:00
original title: Dienos programa

Program ID: 1
start time: 6:05
original title: Dvira?io šou
description: Humoro laida.
Ved?jai Kristina Savickyt? ir Vytautas Šer?nas.

Program ID: 2
start time: 6:35
original title: Nuostabiausi mitai ir legendos (12)
description: (Wonderous Myths & Legends).
production year: 1999
genre: Animacinis serialas
origin: JAV

Program ID: 3
start time: 7:00
original title: Visos žvaigžd?s (24)
description: (Baby Looney Tunes I). Rež.: Michael Hack, Scott Heming.
production year: 2002
genre: Animacinis serialas
origin: JAV

Program ID: 4
start time: 7:25
original title: Nekviesta meil? (44)
description: Rež.: Alvydas Šlepikas. Vaid.: Inga Jankauskait?, Adolfas Ve?erskis, Rimant? Valiukait?, Saulius Balandis.
production year: 2006
genre: Serialas
origin: Lietuva

Program ID: 5
start time: 8:00
original title: Langai III (617)
description: (Okna III).
production year: 2005
genre: Pokalbi? laida
origin: Rusija

Above is not complete file, i just copied first 5 programs and I didn't see structural changes in following programs. I also see there ir a log file called datamanager.log.0, but info inside does not lead me anywhere:
<?xml version="1.0" encoding="windows-1252" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
</log>
<?xml version="1.0" encoding="windows-1252" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
</log>


Is there any clever way to debug the program without much knowledge about java?

von Jo » 19 Mär 2007, 12:43

Try "dayprogramfiletranslator raw" first. Then you can see the data in text files in /raw/txt. Maybe you can see there what's wrong.

von ajocius1 » 18 Mär 2007, 20:34

Good News: You were right. I have removed all "<previously-shown />" from htm file and I got rid of that long error message. No it only complains that rating is not a number. An example of error message:
Warning: rating is no number: 'N7', and will be ignored.

Well I don't mind that to be ignored, so I hoped it was the last problem I faced. However, running datamanager I still got only four files in prepared directory. The message on DOS screen looked as follows:
----------------------------
Fine: Updating the channel list
Fine: Updating the mirror list
writing summery to the file...
get the mimimum start date...
write frames...
frameCount: 0
minStartDaysSince1970: 2147483647
done.
-----------------------------

and no file with tvguide listings...

von Jo » 18 Mär 2007, 10:52

I mixed the functions up. The problem is certainly not in extractTime as I wrote above, but in extractDate as displayed in the error message.
And now I think i know the problem:
The data contains "<previously-shown />". XmlTvPDS needs something like "<previously-shown start="200703150605">" That means if the program is a repetition, the date and time of this repetition have to be in the data. It is the same with "next-time-shown" if the program will be repeated later.

von ajocius1 » 17 Mär 2007, 22:10

Jo, thank you for taking you time to help me.

Yes, I use version 2.5.3.

I wish I could debug program and see what is happening when it works with xml file, but my skills in java are equal to zero...

von Jo » 17 Mär 2007, 10:35

What's the Starterkit you use? I refer to version 2.5.3. Maybe the code changed.

von Jo » 17 Mär 2007, 10:32

The code in XmlTvPDS is

Code: Alles auswählen

        private int extractTime(String value) throws IOException {
            // E.g. "200407101030"
            try {
                int hour = Integer.parseInt(value.substring(8, 10));
                int minute = Integer.parseInt(value.substring(10, 12));
                return hour * 60 + minute;
            }
            catch (Throwable thr) {
                throw new IOException("Illegal time value: '" + value + "'");
            }
        }
The exception "Illegal time value: 'null'" should mean that already the String "value" was null. But on the other hand as far as I can see, extractTime is only called if String value is not null. That means I don't know what's wrong. Maybe the developers do know.

von ajocius1 » 17 Mär 2007, 10:05

I only added small part of error message. The whole error message is veeeery long. Total error message file is 230 kb... I copied two paragraphs only, but there are hundreds of them and they all see the same. They alll clame "Illegal time value: "null'" . Seems like an error was in date, and that is How I cam to an idea, that perhaps channel id should be written first (prior) time stamp, which you both confirmed to be not correct....

I have also added part of xml file, the rest of the file looks exactly the same format. I could share the whole file, of course, if someone could have a look into it.

von Jo » 17 Mär 2007, 09:45

It doesn't matter if there are additional digits at the end of the time stamps. It seems that the start date is missing twice somewhere. The exceptions are "Illegal time value: 'null'"

von ajocius1 » 16 Mär 2007, 09:17

Forgot to mention, after I run XMLTVPDS, I do get files in Raw directory, but I also get those error messages. I tried to run datamanager and disregard errors, but then I got only 4 files with group name as part of the file name in prepared directory. No listings in other words.

Nach oben