Kodi Community Forum
Release Janitor - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Service Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=152)
+---- Thread: Release Janitor (/showthread.php?tid=162517)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28


RE: Janitor (formerly Kodi File Cleaner) - messers - 2016-03-29

Exclusions are indeed being ignored. I'm using a source on a Windows network share.


RE: Janitor (formerly Kodi File Cleaner) - Anthirian - 2016-03-29

Please provide me with debug logs so that I may find the root of the problem.


RE: Janitor (formerly Kodi File Cleaner) - messers - 2016-04-02

(2016-03-29, 14:51)Anthirian Wrote: Please provide me with debug logs so that I may find the root of the problem.

I sent you the Pastebin links in a PM, hope that's acceptable.


RE: Janitor (formerly Kodi File Cleaner) - chubbs - 2016-04-06

Hi, this addon worked perfectly for me until I added some shows with Russian Cyrillic characters. I'm not sure if this is supposed to happen or not but I was wondering if you can help. Kodi reads/displays them just fine if that matters.

Here is the log of the error:
Code:
NOTICE: Skin Helper Service --> skin helper service version 1.0.68 started
NOTICE: Skin Helper Service --> WebService - start helper webservice on port 52307
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: 'utf8' codec can't decode byte 0xc1 in position 0: invalid start byte
                      Traceback (most recent call last):
                            File "C:\..\script.filecleaner-master\service.py", line 47, in <module>autostart()
                            File "C:\..\script.filecleaner-master\service.py", line 33, in autostart results, _ = cleaner.clean_all()
                            File "C:\..\script.filecleaner-master\default.py", line 233, in clean_all cleaned_files, count, status = self.clean(video_type)
                            File "C:\..\script.filecleaner-master\default.py", line 141, in clean expired_videos = self.get_expired_videos(video_type)
                            File "C:\..\script.filecleaner-master\default.py", line 335, in get_expired_videos result = json.loads(response)
                            File "C:..\Kodi\system\python\Lib\json\__init__.py", line 338, in loads return _default_decoder.decode(s)
                            File "C:\..\Kodi\system\python\Lib\json\decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end())
                            File "C:\..\Kodi\system\python\Lib\json\decoder.py", line 382, in raw_decode obj, end = self.scan_once(s, idx)
                            UnicodeDecodeError: 'utf8' codec can't decode byte 0xc1 in position 0: invalid start byte
                            -->End of Python script error report<--

Thanks for any help you can provide!


RE: Janitor (formerly Kodi File Cleaner) - Anthirian - 2016-04-07

Thanks for posting your logs. It looks like this is an issue with the JSON module shipped with Kodi. I'm not sure if I am able to fix this issue by myself, but I will look into it.


RE: Janitor (formerly Kodi File Cleaner) - DjDiabolik - 2016-04-08

Simply question....... on my OSMC installation i have checked by Filezilla and i have access to many addons folder and i have watched i have some double and in some cases triple folder about some addons (for example the youtube addons i have upgraded manually installed by zip maintained in this forum) and also on userdate/addons i have folder like addons unistalled to many time ago.

You thinks i can use this cleaner to make some cleaning on my OMSC installation Huh Or you thinks it's better every 6 o 7 months it's better to make a clean installation from beginning ?


RE: Janitor (formerly Kodi File Cleaner) - chubbs - 2016-04-12

(2016-04-07, 16:53)Anthirian Wrote: Thanks for posting your logs. It looks like this is an issue with the JSON module shipped with Kodi. I'm not sure if I am able to fix this issue by myself, but I will look into it.

Yeah, I think you're right. Unfortunately even when I try to exclude the paths (using the GUI), it still pulls in the files with videolibrary.geteposides or .getmovies, and then checks if the path is excluded afterwards which still throws the error. Is there a particular reason that you don't exclude the paths using a filter prior to the videolibrary.get as opposed to checking afterwards if the episode is excluded?

I was thinking about possibly trying to add something in myself like "by_path = {"field": "path", "operator": "doesnotcontain", "value": ""}" and then appending that to the filter list before it calls videolibrary.getepisodes to solve this issue on my own. But I don't know much about programming and not sure if that would just break the whole addon.


RE: Janitor (formerly Kodi File Cleaner) - YoYoost - 2016-04-22

Hey,

I'm having trouble running the cleaning service. I tried defaulting the settings, reinstalling with removing the settings from my profile but nothing works.
Am I doing something wrong or missing a dependency or something?

This is running Kodi (16.0 Git:2016-03-11-a3eb4fa) on Xbian XBian 1.0 (knockout), kernel: Linux ARM 32-bit version 4.4.7+

Code:
22:19:18 189.574554 T:1603265456   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.NameError'>
                                            Error Contents: global name 'monitor' is not defined
                                            Traceback (most recent call last):
                                              File "/home/xbian/.kodi/addons/script.filecleaner/service.py", line 47, in <module>
                                                autostart()
                                              File "/home/xbian/.kodi/addons/script.filecleaner/service.py", line 33, in autostart
                                                results, _ = cleaner.clean_all()
                                              File "/home/xbian/.kodi/addons/script.filecleaner/default.py", line 247, in clean_all
                                                monitor.waitForAbort(2)  # Sleep 2 seconds to make sure file I/O is done.
                                            NameError: global name 'monitor' is not defined
                                            -->End of Python script error report<--
22:19:18 189.659180 T:1603265456 WARNING: CPythonInvoker(5, /home/xbian/.kodi/addons/script.filecleaner/service.py): the python script "/home/xbian/.kodi/addons/script.filecleaner/service.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon7xbmcgui14DialogProgressE

edit:
Can't repro it anymore... I work in IT so this happens to a lot of my clients aswell:
- I removed the addon, /.kodi/addons/script.filecleaner/ and /.kodi/userdata/addon_data/script.filecleaner again.
- Restarted the device again
- Reinstalled and reconfigured Janitor

Now it works fine. Please note that I did all this before. Lets just call it a layer 8 problem... Thanks for listening and if it happens again I will update.


RE: Janitor (formerly Kodi File Cleaner) - Anthirian - 2016-04-22

(2016-04-08, 01:54)DjDiabolik Wrote: Simply question....... on my OSMC installation i have checked by Filezilla and i have access to many addons folder and i have watched i have some double and in some cases triple folder about some addons (for example the youtube addons i have upgraded manually installed by zip maintained in this forum) and also on userdate/addons i have folder like addons unistalled to many time ago.

You thinks i can use this cleaner to make some cleaning on my OMSC installation Huh Or you thinks it's better every 6 o 7 months it's better to make a clean installation from beginning ?
I'm afraid Janitor cannot help you with this. It will only clean actual video files and does not have access to other addons' files.

(2016-04-12, 20:47)chubbs Wrote:
(2016-04-07, 16:53)Anthirian Wrote: Thanks for posting your logs. It looks like this is an issue with the JSON module shipped with Kodi. I'm not sure if I am able to fix this issue by myself, but I will look into it.

Yeah, I think you're right. Unfortunately even when I try to exclude the paths (using the GUI), it still pulls in the files with videolibrary.geteposides or .getmovies, and then checks if the path is excluded afterwards which still throws the error. Is there a particular reason that you don't exclude the paths using a filter prior to the videolibrary.get as opposed to checking afterwards if the episode is excluded?

I was thinking about possibly trying to add something in myself like "by_path = {"field": "path", "operator": "doesnotcontain", "value": ""}" and then appending that to the filter list before it calls videolibrary.getepisodes to solve this issue on my own. But I don't know much about programming and not sure if that would just break the whole addon.
That's actually not a bad idea. I'll definitely look into that. I have already made some performance improvements in this area, but this looks like another solid improvement. Hopefully this will also resolve your issue. I'll try to push a small update for this later this month, or early next month. If you could test it before I update the repository with the new version that would be great.

(2016-04-22, 19:30)YoYoost Wrote: Hey,

I'm having trouble running the cleaning service. I tried defaulting the settings, reinstalling with removing the settings from my profile but nothing works.
Am I doing something wrong or missing a dependency or something?

This is running Kodi (16.0 Git:2016-03-11-a3eb4fa) on Xbian XBian 1.0 (knockout), kernel: Linux ARM 32-bit version 4.4.7+

Code:
22:19:18 189.574554 T:1603265456   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.NameError'>
                                            Error Contents: global name 'monitor' is not defined
                                            Traceback (most recent call last):
                                              File "/home/xbian/.kodi/addons/script.filecleaner/service.py", line 47, in <module>
                                                autostart()
                                              File "/home/xbian/.kodi/addons/script.filecleaner/service.py", line 33, in autostart
                                                results, _ = cleaner.clean_all()
                                              File "/home/xbian/.kodi/addons/script.filecleaner/default.py", line 247, in clean_all
                                                monitor.waitForAbort(2)  # Sleep 2 seconds to make sure file I/O is done.
                                            NameError: global name 'monitor' is not defined
                                            -->End of Python script error report<--
22:19:18 189.659180 T:1603265456 WARNING: CPythonInvoker(5, /home/xbian/.kodi/addons/script.filecleaner/service.py): the python script "/home/xbian/.kodi/addons/script.filecleaner/service.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon7xbmcgui14DialogProgressE
That sure looks strange. Unfortunately I cannot determine the cause by just this snippet of the log. Could you please enable debug logging in Janitor's settings and post the entire log on Pastebin?


RE: Janitor (formerly Kodi File Cleaner) - YoYoost - 2016-04-23

Contrary to my last edit it did fail again, is it OK if I PM you a Pastebin?


RE: Janitor (formerly Kodi File Cleaner) - MichaelW1998 - 2016-04-25

(2016-04-22, 21:18)Anthirian Wrote:
(2016-04-08, 01:54)DjDiabolik Wrote: Simply question....... on my OSMC installation i have checked by Filezilla and i have access to many addons folder and i have watched i have some double and in some cases triple folder about some addons (for example the youtube addons i have upgraded manually installed by zip maintained in this forum) and also on userdate/addons i have folder like addons unistalled to many time ago.

You thinks i can use this cleaner to make some cleaning on my OMSC installation Huh Or you thinks it's better every 6 o 7 months it's better to make a clean installation from beginning ?
I'm afraid Janitor cannot help you with this. It will only clean actual video files and does not have access to other addons' files.

(2016-04-12, 20:47)chubbs Wrote:
(2016-04-07, 16:53)Anthirian Wrote: Thanks for posting your logs. It looks like this is an issue with the JSON module shipped with Kodi. I'm not sure if I am able to fix this issue by myself, but I will look into it.

Yeah, I think you're right. Unfortunately even when I try to exclude the paths (using the GUI), it still pulls in the files with videolibrary.geteposides or .getmovies, and then checks if the path is excluded afterwards which still throws the error. Is there a particular reason that you don't exclude the paths using a filter prior to the videolibrary.get as opposed to checking afterwards if the episode is excluded?

I was thinking about possibly trying to add something in myself like "by_path = {"field": "path", "operator": "doesnotcontain", "value": ""}" and then appending that to the filter list before it calls videolibrary.getepisodes to solve this issue on my own. But I don't know much about programming and not sure if that would just break the whole addon.
That's actually not a bad idea. I'll definitely look into that. I have already made some performance improvements in this area, but this looks like another solid improvement. Hopefully this will also resolve your issue. I'll try to push a small update for this later this month, or early next month. If you could test it before I update the repository with the new version that would be great.

(2016-04-22, 19:30)YoYoost Wrote: Hey,

I'm having trouble running the cleaning service. I tried defaulting the settings, reinstalling with removing the settings from my profile but nothing works.
Am I doing something wrong or missing a dependency or something?

This is running Kodi (16.0 Git:2016-03-11-a3eb4fa) on Xbian XBian 1.0 (knockout), kernel: Linux ARM 32-bit version 4.4.7+

Code:
22:19:18 189.574554 T:1603265456   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.NameError'>
                                            Error Contents: global name 'monitor' is not defined
                                            Traceback (most recent call last):
                                              File "/home/xbian/.kodi/addons/script.filecleaner/service.py", line 47, in <module>
                                                autostart()
                                              File "/home/xbian/.kodi/addons/script.filecleaner/service.py", line 33, in autostart
                                                results, _ = cleaner.clean_all()
                                              File "/home/xbian/.kodi/addons/script.filecleaner/default.py", line 247, in clean_all
                                                monitor.waitForAbort(2)  # Sleep 2 seconds to make sure file I/O is done.
                                            NameError: global name 'monitor' is not defined
                                            -->End of Python script error report<--
22:19:18 189.659180 T:1603265456 WARNING: CPythonInvoker(5, /home/xbian/.kodi/addons/script.filecleaner/service.py): the python script "/home/xbian/.kodi/addons/script.filecleaner/service.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon7xbmcgui14DialogProgressE
That sure looks strange. Unfortunately I cannot determine the cause by just this snippet of the log. Could you please enable debug logging in Janitor's settings and post the entire log on Pastebin?

I have got the same error on Kodi for Windows. Would you like me to send the log file?


RE: Janitor (formerly Kodi File Cleaner) - lostgoat - 2016-04-28

Hi,

I am having problems cleaning up files/folders with special characters in the name.

Log is here:
http://xbmclogs.com/pfzdyoqdu

The files are on a Synology NAS and are accessed from my Nvidia Shield TV (Android) via SMB.

Thanks for your help!


RE: Janitor (formerly Kodi File Cleaner) - media-man - 2016-04-30

Hi,

have the following error I can't get over.
May you help me. Love your addon!!!

Code:
08:02:21 280.952942 T:1756361632   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'\xe4' in position 34: ordinal not in range(128)
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/script.filecleaner/default.py", line 699, in <module>
                                                results, return_status = cleaner.clean_all()
                                              File "/storage/.kodi/addons/script.filecleaner/default.py", line 233, in clean_all
                                                cleaned_files, count, status = self.clean(video_type)
                                              File "/storage/.kodi/addons/script.filecleaner/default.py", line 198, in clean
                                                self.progress.update(int(progress_percent), translate(32616).format(amount=amount, type=type_translation[video_type]), translate(32617), "[I]{0!s}[/I]".format(title))
                                            UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 34: ordinal not in range(128)
                                            -->End of Python script error report<--
08:02:22 281.025513 T:1756361632 WARNING: CPythonInvoker(4, /storage/.kodi/addons/script.filecleaner/default.py): the python script "/storage/.kodi/addons/script.filecleaner/default.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon7xbmcgui14DialogProgressE



RE: Janitor (formerly Kodi File Cleaner) - Anthirian - 2016-05-12

I have just pushed two commits that look like they fix the issues you guys were having with running as a service and foreign language titles. Could you please download the latest version from Github and use this to test if your problem has been solved?


RE: Janitor (formerly Kodi File Cleaner) - YoYoost - 2016-05-13

(2016-05-12, 18:00)Anthirian Wrote: I have just pushed two commits that look like they fix the issues you guys were having with running as a service and foreign language titles. Could you please download the latest version from Github and use this to test if your problem has been solved?

This seems to have fixed it after 1 viewed video, will keep checking.
Thanks for looking into this!

edit:

It keeps working as intended without throwing errors in kodi.log so the issue is definitely fixed.