2020-05-26, 19:33
(2020-04-13, 21:15)Tiny Clanger Wrote: I can't get the add-on to scan any extras — it seems to be objecting to characters in filenames which aren't 7-bit ASCII:I can confirm having a similar issue on my install:
Code:
2020-04-13 20:02:08.211 T:3325678304 INFO: : smb://video@celestia/movies/2001 - A Space Odyssey (1968)/extras/Standing on the Shoulders of Kubrick — the Legacy of 2001.mkv
2020-04-13 20:02:08.366 T:3325678304 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.UnicodeEncodeError'>
Error Contents: 'ascii' codec can't encode character u'\u2014' in position 102: ordinal not in range(128)
Traceback (most recent call last):
File "/home/osmc/.kodi/addons/plugin.video.specialfeatures/script.py", line 70, in <module>
r.updateDB()
File "/home/osmc/.kodi/addons/plugin.video.specialfeatures/script.py", line 38, in updateDB
resultFILTER().router(query)
File "/home/osmc/.kodi/addons/plugin.video.specialfeatures/lib/iteration.py", line 45, in router
self.verifyDir(self.checker)
File "/home/osmc/.kodi/addons/plugin.video.specialfeatures/lib/iteration.py", line 95, in verifyDir
self.t = self.getthumb(self.ef)
File "/home/osmc/.kodi/addons/plugin.video.specialfeatures/lib/iteration.py", line 122, in getthumb
if os.path.isfile(thumbname + ext):
File "/usr/lib/python2.7/genericpath.py", line 37, in isfile
st = os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2014' in position 102: ordinal not in range(128)
-->End of Python script error report<--
I can rename the file in this case, of course — but there are probably plenty more, including some movies whose names have accents, or are even in Japanese. It's rather tedious to run a scan from my TV, then going upstairs to paw through the logs, find which file it didn't like, and rename it — especially since it will only fail on one file at a time
Is there a way to get the add-on to use UTF-8 rather than the 'ascii' codec it appears to be using? (I'm afraid I don't know very much Python — we went through this in the Ruby world a while ago, so the pain is familiar…)
Debug log: https://paste.ubuntu.com/p/T8kXKMn3zF/
Code:
2020-05-26 12:30:31.757 T:7645 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.AttributeError'>
Error Contents: 'NoneType' object has no attribute 'text'
Traceback (most recent call last):
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.specialfeatures/script.py", line 70, in <module>
r.updateDB()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.specialfeatures/script.py", line 39, in updateDB
resultFILTER().router(query2)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.specialfeatures/lib/iteration.py", line 45, in router
self.verifyDir(self.checker)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.specialfeatures/lib/iteration.py", line 93, in verifyDir
self.sf = ip_sf.upDate(self.ef)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.specialfeatures/lib/importexport.py", line 119, in upDate
self.vars()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.specialfeatures/lib/importexport.py", line 126, in vars
self.sorttitle = root.find('sorttitle').text
AttributeError: 'NoneType' object has no attribute 'text'
-->End of Python script error report<--
2020-05-26 12:30:31.757 T:7645 DEBUG: onExecutionDone(55, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.specialfeatures/script.py)
2020-05-26 12:30:31.759 T:5698 DEBUG: ------ Window Init (DialogNotification.xml) ------
2020-05-26 12:30:31.988 T:7645 INFO: Python interpreter stopped
2020-05-26 12:30:31.988 T:7645 DEBUG: Thread LanguageInvoker 7645 terminating