bebo-dot-dev / m3u-epg-editor

a python m3u / epg optimizer
120 stars 27 forks source link

epg creation failure: 'NoneType' object has no attribute 'iter' #57

Closed Gregsr closed 3 years ago

Gregsr commented 3 years ago

All worked a few days ago. I changed nothing. I don't understand. Can you help me please?

_2020-11-27T18:47:06.998966 performing HTTP GET request to http://xxx.com:80/get.php?username=xxx&password=xxx&type=m3u_plus&output=ts 2020-11-27T18:47:19.601753 saving retrieved m3u file: N:\Kodi\IPTV\EPG\original.m3u8 2020-11-27T18:47:19.808878 parsing m3u into a list of objects 2020-11-27T18:47:21.496061 m3u file parse AttributeError: 'NoneType' object has no attribute 'group' 2020-11-27T18:47:31.020366 m3u contains 187363 items 2020-11-27T18:47:31.035995 discarding channel groups in this list ['xxx'] 2020-11-27T18:47:31.035995 hard keeping channels in this list ['xxx'] 2020-11-27T18:48:01.757295 filtered m3u contains 60 items 2020-11-27T18:48:01.926713 saving new m3u file: N:\Kodi\IPTV\EPG\minich.m3u8 2020-11-27T18:48:01.942330 performing HTTP GET request to http://xxx.xxx/xmltv.xml 2020-11-27T18:48:02.130624 saving retrieved epg file: N:\Kodi\IPTV\EPG\original.xml 2020-11-27T18:48:02.130624 creating new xml epg for 56 m3u items 2020-11-27T18:48:02.146253 epg creation failure: 'NoneType' object has no attribute 'iter' 2020-11-27T18:48:02.146253 saving to log: N:\Kodi\IPTV\EPG\process.log 2020-11-27T18:48:02.146253 script runtime: 0 minutes 55 seconds 2020-11-27T18:48:02.146253 process completed

bebo-dot-dev commented 3 years ago

I'll have a go at helping but I'll need more than that to go on. Let's start with you looking for a process.log file that might include some clues about what happened. If you can find that file, paste it's contents here.

Gregsr commented 3 years ago

Here is the log process.log

bebo-dot-dev commented 3 years ago

That doesn't seem right tbh because that appears to either an incomplete file or you're running a very old version of the script. The first line in process.log should contain something that looks like this:

2020-09-20T12:49:35.418961 m3u-epg-editor-py3.py process started with Python v3.8.1 (default, Dec 21 2019, 14:01:05) [GCC 5.4.0 20160609]

Both the py2 and py3 versions of the script support this first line output and they have done for quite some time.

Is your process.log file incomplete or are you running an old version of the script?

Gregsr commented 3 years ago

Sorry, it is incomplete. First line: 2020-11-27T18:47:06.998966 m3u-epg-editor-py3.py process started with Python v3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)]

bebo-dot-dev commented 3 years ago

OK I'm unable to test with Python v3.8.5 because I don't have that version here. I do however have v3.8.1, I have tested with that and some sample data and that does work without any issues.

I doubt that this problem is Python version related and given the errors that are appearing in your process.log file at both m3u parse time and epg creation time, I expect that this problem is more likely related to the data in your source m3u and epg xml files.

I won't be able to debug this any further without seeing your source data files and I'll let you decide if you're willing / able to let me take a look at them. If you are willing to do that, sanitise the files of any personal sensitive security context data but other than that, leave the files completely intact, complete and attach them here.

Gregsr commented 3 years ago

I found the origine. The xml file was empty (link changed).

bebo-dot-dev commented 3 years ago

Good. The next time something like this comes up, the first thing that I'll comment is -> check your source data.