google-code-export / mediaplayer2-for-sh4

Automatically exported from code.google.com/p/mediaplayer2-for-sh4
1 stars 0 forks source link

crash in subsupport for xbmc plugins(script.module.subssupport) #64

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.searching subtitles for movie titanic,for susbsupports script for kodidirect
2.
3.

What is the expected output? What do you see instead?
green screen crash

What version of the product are you using? On what operating system?
1.4.8

Please provide any additional information below.

crashlog
Traceback (most recent call last):
  File "/usr/lib/enigma2/python/mytest.py", line 226, in create
    return screen(self, *arguments, **kwargs)
  File "/usr/lib/enigma2/python/Plugins/Extensions/KodiDirect/scripts/script.module.SubsSupport/lib/SubsSupport/subtitles.py", line 3536, in __init__
    self.message = Message(self['loadmessage'], self['errormessage'])
  File "/usr/lib/enigma2/python/Plugins/Extensions/KodiDirect/scripts/script.module.SubsSupport/lib/SubsSupport/subtitles.py", line 3305, in __init__
    timer_conn = timer.timeout.connect(self.hide)

the error on these lines

        self.timer = eTimer()
        try:
                      timer_conn = timer.timeout.connect(self.hide)
        except AttributeError:
                      timer.callback.append(self.hide)

i think timer should be replaced with self.timer

Original issue reported on code.google.com by mfara...@gmail.com on 7 Feb 2015 at 2:21

GoogleCodeExporter commented 9 years ago
Sorry the error message
NameError: global name 'timer' is not defined

Original comment by mfara...@gmail.com on 7 Feb 2015 at 2:22

GoogleCodeExporter commented 9 years ago
This code is not from mine subtitles.py. In original subtitles.py is Message 
class defined like this:

class Message(object):
    def __init__(self, infowidget, errorwidget):
        self.infowidget = infowidget
        self.errorwidget = errorwidget
        self.timer = eTimer()
        self.timer.callback.append(self.hide)

    def info(self, text, timeout=None):
        self.timer.stop()
        self.errorwidget.hide()
        self.infowidget.setText(text)
        self.infowidget.show()
        if timeout:
            self.timer.start(timeout, True)

    def error(self, text, timeout=None):
        self.timer.stop()
        self.infowidget.hide()
        self.errorwidget.setText(text)
        self.errorwidget.show()
        if timeout:
            self.timer.start(timeout, True)

    def hide(self):
        self.timer.stop()
        self.errorwidget.hide()
        self.infowidget.hide()

Original comment by mx3Lm...@gmail.com on 7 Feb 2015 at 4:11

GoogleCodeExporter commented 9 years ago

Original comment by mx3Lm...@gmail.com on 19 Feb 2015 at 11:01