Jump to content


Photo

XMLTVimport gets in an infinite loop


  • Please log in to reply
36 replies to this topic

#1 doglover

  • Rytec EPG Team
  • 17,362 posts

+657
Excellent

Posted 16 August 2017 - 17:19

When XMLTVimport cannot find the channels file (rytec.channels.xml.gz and others) it gets into an infinity loop, so it seems.

The import is stuck, and you cannot get out of it.  The only way is to restart enigma2.

An none existing XMLTV file (data file) is fine.  The importer just reports in the log it cannot find the file.  No problem with this.

 

The receiver is not stuck, it is still responsive.

 

Can somebody with knowledge of python take a look at this, and propose a solution?

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: XMLTVimport gets in an infinite loop #2 WanWizard

  • PLi® Core member
  • 70,220 posts

+1,798
Excellent

Posted 16 August 2017 - 17:26

What does it log when this happens?


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: XMLTVimport gets in an infinite loop #3 Pr2

  • PLi® Contributor
  • 6,165 posts

+261
Excellent

Posted 16 August 2017 - 18:41

I can confirm this, the imported doesn't check the result when trying to open the channels file so if it doesn't exist, it is stuck forever trying to read a non existing file.


NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: XMLTVimport gets in an infinite loop #4 doglover

  • Rytec EPG Team
  • 17,362 posts

+657
Excellent

Posted 17 August 2017 - 07:20

What does it log when this happens?

 

Nothing really.  It just ends on a normal entry.  (Can not say exactly what it is - would have to try again to see it exactly)

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: XMLTVimport gets in an infinite loop #5 doglover

  • Rytec EPG Team
  • 17,362 posts

+657
Excellent

Posted 17 August 2017 - 07:24

OK.  It is easy enough to generate the fault.  Made an error in the position of the channels file, and this is wat is shown in the log:

[EPGImport] autostart (0) occured at 1502943486.45
[EPGImport] autostart (0) occured at 1502943486.62
[EPGImport] WakeUpTime now set to -1 (now=1502943486)
[EPGImport] Selected sources: ['AFN']
sourcesDone():  True ['AFN']
[EPGImport] nextImport, source= AFN
[EPGImport] afterDownload /home/Fritz/epg/rytecAFN.gz
[EPGImport] afterChannelDownload None
[EPGImport] Using twisted thread

It stays there forever.

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: XMLTVimport gets in an infinite loop #6 WanWizard

  • PLi® Core member
  • 70,220 posts

+1,798
Excellent

Posted 17 August 2017 - 10:06

Hmm... This looks to be above my paygrade, I have to pass this to MiLo.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: XMLTVimport gets in an infinite loop #7 Pr2

  • PLi® Contributor
  • 6,165 posts

+261
Excellent

Posted 17 August 2017 - 10:19

Test in line 216 is wrong in EPGimport.py (if filename:), we saw in log that the filename is "None" so it doesn't enter the test that use the os.path.getsize to check if the file exist.

So the normal process continue even if the file is None. 

So this test must be reviewed to cover the "None" case, the check on the filename is not a valid test.


NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: XMLTVimport gets in an infinite loop #8 WanWizard

  • PLi® Core member
  • 70,220 posts

+1,798
Excellent

Posted 17 August 2017 - 10:20

Ok, I can do that.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: XMLTVimport gets in an infinite loop #9 WanWizard

  • PLi® Core member
  • 70,220 posts

+1,798
Excellent

Posted 17 August 2017 - 11:35

This should do it? https://github.com/O...7a12e80e46ecebe


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: XMLTVimport gets in an infinite loop #10 Pr2

  • PLi® Contributor
  • 6,165 posts

+261
Excellent

Posted 17 August 2017 - 12:37

Hi,
 
I think (but to be tested) that the "if filename" test is useless, just testing directly with os.path.getsize(filename): will achieve the same result.

Pr2


NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: XMLTVimport gets in an infinite loop #11 WanWizard

  • PLi® Core member
  • 70,220 posts

+1,798
Excellent

Posted 17 August 2017 - 12:42

Did you check the commit?

 

I did remove the "if filename" check. I also removed the useless try/except block with the raise statement, as you can pass the exception directly.

 

I do check for None, as I want a different error message for "not present" vs "file empty".


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: XMLTVimport gets in an infinite loop #12 Pr2

  • PLi® Contributor
  • 6,165 posts

+261
Excellent

Posted 21 August 2017 - 18:13

Hi,

 

Sorry to report it so late, I was waiting for Willy feedback to be sure that the solution was not working.

It starts import but when it reach the wrong condition it no longer read the other files.

 

Pr2


NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.

Wanna help with OpenPLi Translation? Please read our Wiki Information for translators

Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)

AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
 


Re: XMLTVimport gets in an infinite loop #13 WanWizard

  • PLi® Core member
  • 70,220 posts

+1,798
Excellent

Posted 21 August 2017 - 18:18

Yeah, working on it as I type. ;)


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: XMLTVimport gets in an infinite loop #14 WanWizard

  • PLi® Core member
  • 70,220 posts

+1,798
Excellent

Posted 21 August 2017 - 20:23

Found and fixed the endless loop. Waiting for Willy to confirm.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: XMLTVimport gets in an infinite loop #15 doglover

  • Rytec EPG Team
  • 17,362 posts

+657
Excellent

Posted 22 August 2017 - 07:44

Will try today.  Fishing out the file from the Github.  Putting it in my receiver and do some testing.

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: XMLTVimport gets in an infinite loop #16 doglover

  • Rytec EPG Team
  • 17,362 posts

+657
Excellent

Posted 22 August 2017 - 08:15

It still hangs.  And yes with the new file from the github.

[EPGImport] nextImport, source= News Channels (xz)
[EPGImport] Downloading: xxxxxxxxxxxxxxxxxxxxxxxx.xz to local path: /tmp/epgimport.xz
[EPGImport] afterDownload /tmp/epgimport.xz
[EPGImport] unlink /tmp/epgimport.xz
[EPGImport] afterChannelDownload None
[EPGImport] Using twisted thread
[XMLTVConverter] Enumerating event information
Unknown channel:  DeutscheWelleDE.de
Unknown channel:  AlArabiya.nws
Unknown channel:  TV5MONDEMaghreb-Orient.fr
Unknown channel:  PCNEChinese.uk
Unknown channel:  SkyNwsArabia.nws
Unknown channel:  TRTInternational
[EPGImport] ### thread is ready ### Events: 13333
[EPGImport] nextImport, source= Erotic (xz)
[EPGImport] Downloading: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xz to local path: /tmp/epgimport.xz
[EPGImport] afterDownload /tmp/epgimport.xz
[EPGImport] unlink /tmp/epgimport.xz
[EPGImport] afterChannelDownload None
[EPGImport] Using twisted thread

The error I made was in the published sources file replacing one xz with an tz

here

<source type="gen_xmltv" channels="rytec.channels.xml.tz">
<description>Erotic (xz)</description>
<url>.....</url>
</source>

(here the exact URL for the channels file is defined via the name and the mappings at front of the sources file.  In this case there is no mapping, so the program will look into /etc/epgimport/ for a file with this name)

The error is not fixed.  It looks like we are looking at the wrong place,  I think.

 

On the other hand.  We know this can happen.  And we know what causes this.  It cannot find a file, and you know in which source you have to look to correct the mistake.

So correct the mistake, restart enigma2 and you are back into business.

It is annoying yes.  But fortunately it will not happen very often, and the receiver is not stuck, only the EPGimport.  And only with an error in the sources file, which users do not normally edit.

 

I propose to leave it for the moment (unless some-one has a bright idea).  We will come across some more info at some point.

 

Willy

 

I did this test on 6.0-rc


Edited by doglover, 22 August 2017 - 08:16.

~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: XMLTVimport gets in an infinite loop #17 doglover

  • Rytec EPG Team
  • 17,362 posts

+657
Excellent

Posted 22 August 2017 - 08:20

Forgot the note:  The EPGimport.py from the github with WanWizard's modifications, runs now normally.

 

It fixes something although not this error.

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: XMLTVimport gets in an infinite loop #18 Abu Baniaz

  • PLi® Contributor
  • 2,494 posts

+64
Good

Posted 22 August 2017 - 08:29

Did you use both modified files or just one?

Edited by Abu Baniaz, 22 August 2017 - 08:29.


Re: XMLTVimport gets in an infinite loop #19 doglover

  • Rytec EPG Team
  • 17,362 posts

+657
Excellent

Posted 22 August 2017 - 08:35

Just the EPGImport.py file.

The other one is for the expandable source list (treeview) which has nothing to do with this.

 

Just to be safe, I will test that one also.

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: XMLTVimport gets in an infinite loop #20 doglover

  • Rytec EPG Team
  • 17,362 posts

+657
Excellent

Posted 22 August 2017 - 08:49

As expected, no problem.

In the source selection list the children are indented now.

I let you decide if this needs cosmetic modifications (liker bigger spacing between the + and - signs and the text.

 

Willy

Attached Files


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users