Release - XBMC File Cleaner

  Thread Rating:
  • 3 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
lysin Offline
Member
Posts: 91
Joined: Mar 2012
Reputation: 1
Post: #16
Yes, it happens every time.
At least the first time after the initial waiting period (wich I have set for 30 min) it always displays the error.

Maybe it's interacting with some other python process, like sabnzbd?

Or a problem identifying the OS (in this case, Openelec)?

Code:
File "/storage/.xbmc/addons/script.filecleaner/default.py", line 402, in get_free_disk_space
                                                if platform.system() == "Windows":
                                              File "./Lib/platform.py", line 1283, in system
                                              File "./Lib/platform.py", line 1250, in uname
                                              File "./Lib/platform.py", line 1007, in _syscmd_uname
                                            IOError: (10, 'No child processes')
                                            -->End of Python script error report<--

I'm going to change around some options and see if it makes a difference...

[Image: all-thin-banner.jpg]
(This post was last modified: 2013-05-03 17:20 by lysin.)
find quote
lysin Offline
Member
Posts: 91
Joined: Mar 2012
Reputation: 1
Post: #17
Ok, Openelec updated itself to 3.0.2 with the new 12.2 XBMC.

Also, I deactivated the start delay and permanent file deletion and for the time being, the error is gone. At least after 3 reboots.

Now I need something to be deleted to test if its working, but for some reason it's not happening.

EDIT: Ok,please bare with my noobiness. Tongue

File Cleaner is having problems deleting the files from the network address (I have a shared library) and not the local one.

Code:
NOTICE: XBMC File Cleaner: XBMC could not find the file at smb://OE-MC/Media/DATA/TV/Body of Proof/Season 3/Body of Proof - 3x10.mkv

Any advice on how to overcome this obstacle?

Thanks again

[Image: all-thin-banner.jpg]
(This post was last modified: 2013-05-03 19:42 by lysin.)
find quote
Anthirian Offline
Member
Posts: 97
Joined: Jan 2012
Reputation: 1
Post: #18
Thanks for the info. I will look into it when I have the time. I have no idea though how shared libraries work, as I've never used them myself. As a result it probably doesn't work with shared libraries. See also the issue on Github. I fear I have to start using some SQL queries for these databases, am I right?
find quote
lysin Offline
Member
Posts: 91
Joined: Mar 2012
Reputation: 1
Post: #19
Well, my main MC is serving the Video library to a mysql server. On top of that it serves media files using the network path (like the one above).
This is mandatory for my iPad and RasPi to work smoothly.

However, using this will not allow for file removal using File Cleaner. Don't ask me why. Tongue

I've tried setting a password for the smb share (root/openelec, same as the user) but no luck.

This tool is brilliant and I really hope you can get it to work.

Best of luck

Edit: Couldn't we have an option to delete files from Sources and not Library? Maybe combining the two so that we could use watch status...

[Image: all-thin-banner.jpg]
(This post was last modified: 2013-05-12 23:53 by lysin.)
find quote
htpcrelic Offline
Member
Posts: 63
Joined: Jun 2011
Reputation: 0
Post: #20
I just tried this out on my Mac OSX 10.8.2 server. The plugin causes my CPU to jump from 5% to 75%. I sat there clicking enable and disable and watching it happen in the Activity Monitor. I don't have any logs and am sorry I can't be more help at this time. Just thought I'd leave you feedback. Appreciate your work on this project.
find quote
Anthirian Offline
Member
Posts: 97
Joined: Jan 2012
Reputation: 1
Post: #21
Thanks for the information, but unfortunately I cannot identify what is causing this without a form of log. It seems like a bug that needs to get fixed though, but I cannot reproduce it myself.
find quote
htpcrelic Offline
Member
Posts: 63
Joined: Jun 2011
Reputation: 0
Post: #22
(2013-05-12 16:23)Anthirian Wrote:  Thanks for the information, but unfortunately I cannot identify what is causing this without a form of log. It seems like a bug that needs to get fixed though, but I cannot reproduce it myself.

Finally got around to it:
http://pastebin.com/Zy5cLp7E

I turned on debugging, then I enabled your addon for 10 seconds, disabled it, enabled it again, disabled it, then quit XBMC. CPU shot up to over 100% each time it was enabled.
find quote
sp0rk Offline
Junior Member
Posts: 3
Joined: May 2013
Reputation: 0
Post: #23
I've been receiving a script error for this plugin every time XBMC starts. I had the issue before but it seemingly fixed itself for a while and then reappeared, I believe, after updating XBMC recently. I'm running XBMC 13.0-ALPHA3 on on Lubuntu 12.10. I've uploaded my xbmc.log here but I believe the error below is the relevant portion:

Code:
14:52:56 T:2954345280   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: (10, 'No child processes')
                                            Traceback (most recent call last):
                                              File "/home/sp0rk/.xbmc/addons/script.filecleaner/default.py", line 640, in <module>
                                                run = Cleaner()
                                              File "/home/sp0rk/.xbmc/addons/script.filecleaner/default.py", line 94, in __init__
                                                self.cleanup()
                                              File "/home/sp0rk/.xbmc/addons/script.filecleaner/default.py", line 113, in cleanup
                                                if not self.delete_when_low_disk_space or (self.delete_when_low_disk_space and self.disk_space_low()):
                                              File "/home/sp0rk/.xbmc/addons/script.filecleaner/default.py", line 472, in disk_space_low
                                                return self.get_free_disk_space(self.disk_space_check_path) <= self.disk_space_threshold
                                              File "/home/sp0rk/.xbmc/addons/script.filecleaner/default.py", line 402, in get_free_disk_space
                                                if platform.system() == "Windows":
                                              File "/usr/lib/python2.7/platform.py", line 1306, in system
                                                return uname()[0]
                                              File "/usr/lib/python2.7/platform.py", line 1273, in uname
                                                processor = _syscmd_uname('-p','')
                                              File "/usr/lib/python2.7/platform.py", line 1030, in _syscmd_uname
                                                rc = f.close()
                                            IOError: (10, 'No child processes')
                                            -->End of Python script error report<--
find quote
Anthirian Offline
Member
Posts: 97
Joined: Jan 2012
Reputation: 1
Post: #24
(2013-05-19 21:04)sp0rk Wrote:  I've been receiving a script error for this plugin every time XBMC starts. I had the issue before but it seemingly fixed itself for a while and then reappeared, I believe, after updating XBMC recently. I'm running XBMC 13.0-ALPHA3 on on Lubuntu 12.10. I've uploaded my xbmc.log here but I believe the error below is the relevant portion:

Thank you for the error report. I think this error has something to do with the fact that, instead of using XBMC's built-in python, it uses the system's python which seems to have a hard time with the platform module. I have a possible solution for this and would like to ask you to check it for me before I push it to the official repo.

On line 402 it checks if the current platform is Windows:
PHP Code:
if platform.system() == "Windows"
Changing it to the following makes use of XBMC's own way of detecting the current platform:
PHP Code:
if xbmc.getCondVisibility("System.Platform.Windows"): 

Would you mind changing your code this way and report if it fixed your issue?
(This post was last modified: 2013-05-20 13:47 by Anthirian.)
find quote
Anthirian Offline
Member
Posts: 97
Joined: Jan 2012
Reputation: 1
Post: #25
(2013-04-24 05:15)straasha Wrote:  this version is causing a very high CPU utilization...around 65-75%...and never goes back to normal. I have a core 2 duo 2.53 GHz. I have tried on both 12.1 and the latest 12.2 pre build with the same results.

here is a log report
http://pastebin.ca/2365113
I noticed I overlooked something in your debug log. There is an issue with the reloading of the settings that happened a while ago when the addon was first added to the XBMC repo. Older versions from git seem to have incompatible settings. You can fix this particular script error by setting a different value for the scan interval, and then changing it back to the value you wanted it to be in the first place. If that does not fix the issue, please report back with another debug log.

(2013-05-18 12:40)htpcrelic Wrote:  Finally got around to it:
http://pastebin.com/Zy5cLp7E

I turned on debugging, then I enabled your addon for 10 seconds, disabled it, enabled it again, disabled it, then quit XBMC. CPU shot up to over 100% each time it was enabled.
Unfortunately there is no output from the addon in the debug log you uploaded. This is because according to your log, the logging level is set too low: "NOTICE: Log level changed to 0".

Please add the following line to your advancedsettings.xml and try again.
PHP Code:
<loglevel>1</loglevel
Also, from your advanced settings I see that you use a shared library. Unfortunately shared libraries are fully untested at the moment, and appear to be unsupported. See also this issue on Github. That could also be a reason for the high CPU utilization, but I won't know for sure until I get a more detailed debug log.
(This post was last modified: 2013-05-20 14:05 by Anthirian.)
find quote
sp0rk Offline
Junior Member
Posts: 3
Joined: May 2013
Reputation: 0
Post: #26
(2013-05-20 13:45)Anthirian Wrote:  
(2013-05-19 21:04)sp0rk Wrote:  I've been receiving a script error for this plugin every time XBMC starts. I had the issue before but it seemingly fixed itself for a while and then reappeared, I believe, after updating XBMC recently. I'm running XBMC 13.0-ALPHA3 on on Lubuntu 12.10. I've uploaded my xbmc.log here but I believe the error below is the relevant portion:

Thank you for the error report. I think this error has something to do with the fact that, instead of using XBMC's built-in python, it uses the system's python which seems to have a hard time with the platform module. I have a possible solution for this and would like to ask you to check it for me before I push it to the official repo.

On line 402 it checks if the current platform is Windows:
PHP Code:
if platform.system() == "Windows"
Changing it to the following makes use of XBMC's own way of detecting the current platform:
PHP Code:
if xbmc.getCondVisibility("System.Platform.Windows"): 

Would you mind changing your code this way and report if it fixed your issue?
Yep, this change seems to have done the trick. Thanks!
find quote
Anthirian Offline
Member
Posts: 97
Joined: Jan 2012
Reputation: 1
Post: #27
Thanks for that information, I will release an updated version to the repo soon.
find quote
lysin Offline
Member
Posts: 91
Joined: Mar 2012
Reputation: 1
Post: #28
This seems to have make it work with network shares too, but I can't enable moving to temp directory. Only permanent file deletion. And I just erased 400Gb without even noticing Tongue

Here is the log if you need to check it out:

https://gist.github.com/lysin/2363974ff5df81ec8247

[Image: all-thin-banner.jpg]
(This post was last modified: 2013-05-20 16:59 by lysin.)
find quote
Anthirian Offline
Member
Posts: 97
Joined: Jan 2012
Reputation: 1
Post: #29
That's strange, since that change only affects disk space checks, which you haven't enabled judging from your log. The log also doesn't say anything about not being able to choose a temp folder. What exactly goes wrong when you try to enable this setting? Is the item unselectable, or something else?
find quote
lysin Offline
Member
Posts: 91
Joined: Mar 2012
Reputation: 1
Post: #30
I can select the option, but then it shows an error saying it can't find the files.

I just associated to the change you made but now that you're telling me that it has nothing to do with that, then it definitely is about the "move instead of delete" option.

With "Move to temp dir" on, it says that it can't find the files:

Code:
15:49:06 T:140559218276096  NOTICE: XBMC File Cleaner: XBMC could not find the file at smb://OE-MC/Media/DATA/TV/Being Human Us/Season 3/Being Human Us - 3x10.mkv


With "delete permanently", it erases everything fine!

Code:
15:53:16 T:140559218276096  NOTICE: XBMC File Cleaner: Deleting file at smb://OE-MC/Media/DATA/TV/Touch/Season 1/Touch - 1x11.nfo
15:53:16 T:140559218276096  NOTICE: XBMC File Cleaner: Deleted 198 episodes

[Image: all-thin-banner.jpg]
find quote
Post Reply