Moin Moin,
@Gismo112: ich bin auf eine Regression im Plugin gestoßen.
Verwendete Version: v1.10.10.1
Version ohne Fehler: v1.10.6
Hier der Fehler-Output:
Code
:44:18.081 T:1697641200 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ImportError'>
Error Contents: Failed to import _strptime because the import lockis held by another thread.
Traceback (most recent call last):
File "/home/osmc/.kodi/addons/plugin.video.skygo.de/default.py", line 65, in <module>
nav.listPath(params['path'])
File "/home/osmc/.kodi/addons/plugin.video.skygo.de/navigation.py", line 705, in listPath
listitems = parseListing(page, path)
File "/home/osmc/.kodi/addons/plugin.video.skygo.de/navigation.py", line 434, in parseListing
listPath(page['listing']['listing']['item']['path'])
File "/home/osmc/.kodi/addons/plugin.video.skygo.de/navigation.py", line 706, in listPath
listAssets(listitems)
File "/home/osmc/.kodi/addons/plugin.video.skygo.de/navigation.py", line 632, in listAssets
info, item['data'] = getInfoLabel(item['type'], item['data'])
File "/home/osmc/.kodi/addons/plugin.video.skygo.de/navigation.py", line 490, in getInfoLabel
end_date = datetime.datetime.strptime(string_date, format)
ImportError: Failed to import _strptime because the import lockis held by another thread.
-->End of Python script error report<--
Alles anzeigen
Ich hatte das selbe Problem auch mal in einem Plugin von mir, hier hat BJ1 dann ausgeholfen.
Siehe:
Code
# convert datetime string to timestamp with workaround python bug (http://bugs.python.org/issue7980) - Thanks to BJ1
def date2timeStamp(date, format):
try:
dtime = datetime.datetime.strptime(date, format)
except TypeError:
try:
dtime = datetime.datetime.fromtimestamp(time.mktime(time.strptime(date, format)))
except ValueError:
return False
except Exception:
return False
return int(time.mktime(dtime.timetuple()))
Alles anzeigen
Hoffe das hilft