Release Visual Thumbs - (Create thumbs for subfolders in picture library)
#16
Big Grin
Code:
20:37:56 T:6800  NOTICE: THUMBS >> PATH: >>//NSA325-V2/photo/Foto/2003\03-06-2003_Casa Alberto<<
20:37:59 T:6800   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.IOError'>
                                            Error Contents: cannot identify image file
                                            Traceback (most recent call last):
                                              File "C:\Users\Peppe\AppData\Roaming\Kodi\addons\script.visual_thumbs\addon.py", line 243, in <module>
                                                scanPaths( path )
                                              File "C:\Users\Peppe\AppData\Roaming\Kodi\addons\script.visual_thumbs\addon.py", line 184, in scanPaths
                                                MakeTumbs( filesInTree2, os.path.join(thumbsPath2, "folder.jpg" ) )
                                              File "C:\Users\Peppe\AppData\Roaming\Kodi\addons\script.visual_thumbs\addon.py", line 122, in MakeTumbs
                                                image = Image.open(randomList[2])
                                              File "C:\Program Files (x86)\Kodi\addons\script.module.pil\lib\PIL\Image.py", line 1980, in open
                                                raise IOError("cannot identify image file")
                                            IOError: cannot identify image file
                                            -->End of Python script error report<--
i figured out he is doing folder.jpg in the deepest folder, the one with the images, maybe for this it is so slow. http://puu.sh/pHNhU/1906597314.jpg
Peppe
Reply
#17
Hmm, this could be KODI issue with Android >5.1 ... and permissions. It works on windows no problems. Do you have android box?
Reply
#18
No. I'm on Windows 10 pro. Images are on a zyxel nas no wifi but cable!
Reply
#19
Do you know how to change the script in plugin folder so I dont have to upload new test version to repository on every change? Just download the file and overwrite the original one in KODI directory where the plugins are (Kodi/addons/script.visual_thumbs)

test

This will create an entry in the KODI.log so we can see what error and what file is the problem.
Reply
#20
Sure, i can.
but not now, i'm at work and my kody system is turned off. i will do and report.

Peppe

EDIT

have you seen that folder.jpg are created in deepest folders.
Reply
#21
(2016-06-28, 08:52)peppe_sr Wrote: have you seen that folder.jpg are created in deepest folders.

Yes, I'll try to solve that later, it is not such a big deal compared to failing to write completely Smile It shouldn't happen though, if it is 3 levels? What is the path to this folder? How many levels?
Reply
#22
here is the whole path of the example i posted
Code:
\\MY-NAS\photo\Foto\2003\02-23-2003_Ognina
Peppe
Reply
#23
Been reading about KODI and external devices and it seems there are problems with KODI writing to anything else than internal storage.... I'll post another test version for you later Smile
Reply
#24
OK, I uploaded new version to repository. Try it first without changing the config. It uses new approach to creating thumbs. If it doesn't work, set the option to create thumbs in userdata folder. Then at least you can copy them via ES explorer to your NAS. The thumbs created in userdata copy the folder structure of your pictures.
Reply
#25
Good morning,
tested new script version, i performed the scan without new setting.
about half an hour to scan 840 folders.
the script goes till the end but no images has been written and in the log i found lines like this:
Code:
08:23:30 T:6688   ERROR: XFILE::CDirectory::Create - Error creating //NSA325-V2/photo/Foto/2001\
08:23:30 T:6688   ERROR: XFILE::CDirectory::Create - Error creating //NSA325-V2/photo/Foto/2001\08-03-2001_Benny\
i think related to the write permissions you talked about.

i tried with new setting, and i received another error about unicode character (ignored in previous scan, that's strange)
Code:
09:17:25 T:6520   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.UnicodeDecodeError'>
                                            Error Contents: 'ascii' codec can't decode byte 0xc3 in position 96: ordinal not in range(128)
                                            Traceback (most recent call last):
                                              File "C:\Users\Peppe\AppData\Roaming\Kodi\addons\script.visual_thumbs\addon.py", line 326, in <module>
                                                intCancel = scanPaths( path, g, pathsNr )
                                              File "C:\Users\Peppe\AppData\Roaming\Kodi\addons\script.visual_thumbs\addon.py", line 232, in scanPaths
                                                MakeTumbs( filesInTree2, absolutePath.encode('utf-8') )
                                              File "C:\Users\Peppe\AppData\Roaming\Kodi\addons\script.visual_thumbs\addon.py", line 147, in MakeTumbs
                                                xbmcvfs.copy(tempdir.encode('utf-8'), destPath.encode('utf-8'))
                                            UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 96: ordinal not in range(128)
                                            -->End of Python script error report<--

this is the first part of the log during second scan with new setting on

Code:
09:17:07 T:6520  NOTICE: THUMBS >> PATH: >>//NSA325-V2/photo/Foto/<<
09:17:07 T:6520  NOTICE: THUMBS >> PATH: >>//NSA325-V2/photo/Foto/2001<<
09:17:07 T:6520  NOTICE: THUMBS >> PATH: >>//NSA325-V2/photo/Foto/2001\02-22-2001_Etna<<
09:17:07 T:6520  NOTICE: THUMBS >> PATH: >>//NSA325-V2/photo/Foto/2001\08-03-2001_Benny<<
09:17:08 T:6520  NOTICE: THUMBS >> THUMB TEMP SAVED: >>C:\Users\Peppe\AppData\Roaming\Kodi\cache\folder.jpg<<
09:17:08 T:6520   ERROR: XFILE::CDirectory::Create - Error creating C:\
09:17:08 T:6520  NOTICE: THUMBS >> COPIED TEMP TO: >>C:\Users\Peppe\AppData\Roaming\Kodi\userdata\addon_data\script.visual_thumbs\2001\02-22-2001_Etna\folder.jpg<<
09:17:08 T:6520  NOTICE: THUMBS >> DELETED TEMP: >>C:\Users\Peppe\AppData\Roaming\Kodi\cache\folder.jpg<<
09:17:08 T:6520  NOTICE: THUMBS >> PATH: >>//NSA325-V2/photo/Foto/2001\07-05-2001_Arenella<<
09:17:09 T:6520  NOTICE: THUMBS >> THUMB TEMP SAVED: >>C:\Users\Peppe\AppData\Roaming\Kodi\cache\folder.jpg<<
09:17:09 T:6520   ERROR: XFILE::CDirectory::Create - Error creating C:\
09:17:09 T:6520  NOTICE: THUMBS >> COPIED TEMP TO: >>C:\Users\Peppe\AppData\Roaming\Kodi\userdata\addon_data\script.visual_thumbs\2001\08-03-2001_Benny\folder.jpg<<
the strange thing, after second scan, is that for scanned folders the folder.jpg are saved only in the deepest folders, the one the kodi manage itself.
i liked the info window with the paths shown. but it has been shown only during first scan without the option to create thumbs in userdata folder on.
Reply
#26
Thanx for testing!

The error "ERROR: XFILE::CDirectory::Create - Error creating C:\" is normal, it can't create C: (I dunno why it even tries), but it doesn't matter.

Is there a thumb file at i.e. C:\Users\Peppe\AppData\Roaming\Kodi\userdata\addon_data\script.visual_thumbs\​2001\02-22-2001_Etna\folder.jpg ??
Reply
#27
(2016-06-29, 10:29)DaLanik Wrote: Is there a thumb file at i.e. C:\Users\Peppe\AppData\Roaming\Kodi\userdata\addon_data\script.visual_thumbs\​2001\02-22-2001_Etna\folder.jpg ??

Yes it is
Reply
#28
Hmm, I'm totaly stupid from this encoding thing... Smile Let's try one more time, at least to fix this encoding... I uploaded new version to the repo 1.4, if you want to try....

D.
Reply
#29
with new version i have immediately an unicode error,
Code:
Error Type: <type 'exceptions.UnicodeDecodeError'>
Error Contents: 'ascii' codec can't decode byte 0xf2 in position 42: ordinal not in range(128)
and the scan doesn't start.
Peppe
Reply
#30
Is there a line in log to find which line/instruction causes this?
Reply

Logout Mark Read Team Forum Stats Members Help
Visual Thumbs - (Create thumbs for subfolders in picture library)0