Jump to content


Photo

[GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty

Plugin Bug GraphMultiEpg

  • Please log in to reply
22 replies to this topic

#1 HES OBUP

  • Member
  • 6 posts

0
Neutral

Posted 15 July 2017 - 10:29

Hi @all,

 

I always get the error switching to an empty service in the plugin GraphMultiEpg:

  File "/usr/lib/enigma2/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py", line 540, in buildEntry
  TypeError: 'int' object has no attribute '__getitem__'

The same error occurs in line 536. 

 

The bug can be fixed:

  1. Configuration "Überspringe leere Sender" (EN 'Skip empty services' ) set to 'Ja'
  2. validate variable 'rec' ( source 'GraphMultiEpg.py' ) in line 536 && 540 != empty

Origin:

if rec is not None and rec[1][-1] in (2, 12, 17, 27):

fixed:

if rec is not None and len(rec) > 0 and rec[1][-1] in (2, 12, 17, 27):

Kind regards

 

Olaf


Kind regards

Olaf


Re: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #2 WanWizard

  • PLi® Core member
  • 70,491 posts

+1,810
Excellent

Posted 15 July 2017 - 10:32

Thanks Olaf,

 

@littlesat, something for you to check?


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: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #3 littlesat

  • PLi® Core member
  • 57,154 posts

+698
Excellent

Posted 15 July 2017 - 10:48

I hate those stupid s note None stuff.... Try if just removing is not None also solves the issue, which is less complicated....and even much better.... No len check required....

Edited by littlesat, 15 July 2017 - 10:50.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #4 WanWizard

  • PLi® Core member
  • 70,491 posts

+1,810
Excellent

Posted 15 July 2017 - 10:50

If "rec" is an "int" (what value then, and why suddenly an int?), and you remove that, wouldn't this fail too?

if rec[1][-1] in (2, 12, 17, 27):

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: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #5 littlesat

  • PLi® Core member
  • 57,154 posts

+698
Excellent

Posted 15 July 2017 - 11:09

I meant

If rec and rec[1][-1] in .......

Just to remove the is not None....

In this case it is almost the same as

If rec is not None and len(rec)>0 and rec[1][-1] in....

Edited by littlesat, 15 July 2017 - 11:10.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #6 WanWizard

  • PLi® Core member
  • 70,491 posts

+1,810
Excellent

Posted 15 July 2017 - 11:12

Ah, ok.

 

Still begs the question where and why rec is suddenly an int (I assume a zero) instead of the expected type. So I think the root cause lies elsewhere.


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: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #7 HES OBUP

  • Member
  • 6 posts

0
Neutral

Posted 15 July 2017 - 11:30

@littlesat:

If rec and rec[1][-1] in .......

changing works on my STB

 

@WanWizard:

 

source 'RecordTimer.py', method 'isInTimer' >> return 'returnValue':

def isInTimer(self, eventid, begin, duration, service):
    returnValue = None

...

if time_match:
  if type in (2,7,12,17,22,27):
	# When full recording do not look further
	returnValue = (time_match, [type])
	break
  elif returnValue:
	if type not in returnValue[1]:
	        returnValue[1].append(type)
	else:
		returnValue = (time_match, [type])

		return returnValue

imo line 1239 is the problem

 

kind  regards

 

Olaf


Kind regards

Olaf


Re: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #8 littlesat

  • PLi® Core member
  • 57,154 posts

+698
Excellent

Posted 15 July 2017 - 12:30

The problem is the is not None check.....

I think we still should solve this for 6.0.... Someone needs to push sh it to rc.

Edited by littlesat, 15 July 2017 - 12:32.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #9 WanWizard

  • PLi® Core member
  • 70,491 posts

+1,810
Excellent

Posted 15 July 2017 - 12:51

I don't really agree.

 

I did some debugging:

[wanwizard@catwoman] $ python
Python 2.7.13 (default, May 10 2017, 20:04:28) 
[GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> rec = 12
>>> if rec is not None: 
...     rec
... 
12
>>> if rec[1][-1] is not None:
...     rec
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'int' object has no attribute '__getitem__'
>>>

So the problem isn't in the "is not None", the problem is that something is returned on which "rec[1][-1]" doesn't work.

 

However, if I look at the isInTimer() method, returnvalue is returned as either None (no timers present), or a tuple (containing an int and a list of int's). I don't immediately see how that can ever return an int.


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: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #10 littlesat

  • PLi® Core member
  • 57,154 posts

+698
Excellent

Posted 15 July 2017 - 12:59

Hold on....


Edited by littlesat, 15 July 2017 - 13:01.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #11 WanWizard

  • PLi® Core member
  • 70,491 posts

+1,810
Excellent

Posted 15 July 2017 - 13:05

If the list is empty, you will get "IndexError: list index out of range". If rec is a tuple without the list (not with an empty list), you will get the "TypeError: 'int' object has no attribute '__getitem__'" error.

 

But if you look at the code, it can't be that the list is empty, there is always at least one "type" in that list, no matter what the value of "type" is.

 

(this is a learning moment for me, I'd like to understand what is going on).


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: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #12 littlesat

  • PLi® Core member
  • 57,154 posts

+698
Excellent

Posted 15 July 2017 - 13:06

It shoud return....

 

None

 

-or-

 

(time_match,[type values])

 

The list can't be empty... it is none or time_match with as second value in the tuple a list of types..

 

When I viewed the code or RerordTimer above our Looks different... So I suggest we already solved this issue...

if time_match:
  if type in (2,7,12,17,22,27):
  # When full recording do not look further
    returnValue = (time_match, [type])
    break
  elif returnValue:
    if type not in returnValue[1]:
    returnValue[1].append(type)
  else:
    returnValue = (time_match, [type])

Edited by littlesat, 15 July 2017 - 13:09.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #13 WanWizard

  • PLi® Core member
  • 70,491 posts

+1,810
Excellent

Posted 15 July 2017 - 13:06

That was the conclusion I was getting at as well, something installed that has overwritten RecordTimer.py?


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: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #14 littlesat

  • PLi® Core member
  • 57,154 posts

+698
Excellent

Posted 15 July 2017 - 13:15

Yep there are plug-ins that might do this....
So I suppose we do not have a bug?

Edited by littlesat, 15 July 2017 - 13:17.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #15 WanWizard

  • PLi® Core member
  • 70,491 posts

+1,810
Excellent

Posted 15 July 2017 - 13:36

I don't think so, but perhaps Olaf can 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: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #16 ims

  • PLi® Core member
  • 13,781 posts

+214
Excellent

Posted 15 July 2017 - 14:10

Hi @all,

 

I always get the error switching to an empty service in the plugin GraphMultiEpg:

 

Do you think "empty service" as service without EPG ? No problem here...


Kdo nic nedělá, nic nezkazí!

Re: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #17 HES OBUP

  • Member
  • 6 posts

0
Neutral

Posted 15 July 2017 - 14:28

I've to check the complete installation/setup.

 

First of all, if you - WanWizard and littlesat - think, that's no bug, o.k.

 

I'll examine the whole installation again - plugin , next plugin, and so on. :lol:

 

Thanks a lot :)

 

Olaf

 

P.S.: config set to skip empty services  :D

 


Kind regards

Olaf


Re: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #18 HES OBUP

  • Member
  • 6 posts

0
Neutral

Posted 15 July 2017 - 14:28

 

Hi @all,

 

I always get the error switching to an empty service in the plugin GraphMultiEpg:

 

Do you think "empty service" as service without EPG ? No problem here...

 

@ims:

 

yeah


Kind regards

Olaf


Re: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #19 Abu Baniaz

  • PLi® Contributor
  • 2,497 posts

+64
Good

Posted 15 July 2017 - 15:03

If there is a sure/definite way of reproducing the crash, please post step by step instructions.

Re: [GraphMultiEpg] Bug line 536 and 540 >> variable 'rec' empty #20 WanWizard

  • PLi® Core member
  • 70,491 posts

+1,810
Excellent

Posted 15 July 2017 - 21:07

Looking at the code of RecordTimer.py, I can see no way that variable can ever contain either an int, or a tuple with an empty list.

 

So for the moment I don't think it is a bug, but caused by something that got overwritten when you installed some plugin (there are a lot of rubbish and therefore not compatible plugins out there, it is an illusion that all Enigma images are compatible).

 

I am also interested in the way to reproduce this problem.


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.




Also tagged with one or more of these keywords: Plugin, Bug, GraphMultiEpg

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users