blueuk808
Posts: 5
Joined: Thu Mar 21, 2013 11:15 am

Errors running Couchpotato post processing

Fri Mar 22, 2013 7:57 am

Hi - I followed a tutorial http://www.cylindric.net/blog/raspberry ... uchpotato/ in order to set up Couchpotato, Sickbeard, SABnzbd and Headphones, and all are up and pretty much working.

I have set it up so that all applications run on the Raspberry Pi and all my data is stored on my NAS. I have set up mounts such as NASmusic NASmovies etc and used these as the file locations for my applications

I'm having an issue with Couchpotato. It has scanned my media folders and added the content, it has also searched for a specific file to download and successfully sent this to SABnzbd. Once SABnzbd has completed, it has put the folder into my temporary watched folder on my NAS. When Couchpotato comes to run the post processing I get the following errors:

[tato.core.plugins.renamer] Failed removing /media/NASusb/ZZSabnzbd/Completed/[Name Of Folder].cp(tt1790885)/130972.nzb: Traceback (most recent call last):
File "/usr/local/couchpotato/couchpotato/core/plugins/renamer/main.py", line 350, in scan
os.remove(src)
OSError: [Errno 13] Permission denied: '/media/NASusb/ZZSabnzbd/Completed/[NameOf Folder].cp(tt1790885)/130972.nzb'

[tato.core.plugins.renamer] Renaming "/media/NASusb/ZZSabnzbd/Completed/[Name Of Folder].cp(tt1790885)" to "/media/NASusb/ZZSabnzbd/Completed/_FAILED_REMOVE_[Name Of Folder].cp(tt1790885)"

[tato.core.plugins.renamer] Failed setting permissions for file: /media/NASusb/ZZSabnzbd/Completed/_FAILED_REMOVE_[Name of Folder].cp(tt1790885), Traceback (most recent call last):
File "/usr/local/couchpotato/couchpotato/core/plugins/renamer/main.py", line 461, in moveFile
os.chmod(dest, Env.getPermission('file'))
OSError: [Errno 1] Operation not permitted: '/media/NASusb/ZZSabnzbd/Completed/_FAILED_REMOVE_[Name Of Folder].cp(tt1790885)'


I then get a series of file not found errors due to the renaming of the folder it would seem.

So Couchpotato has permissions to change the folder name, but can't remove or set permissions. I am also getting the following error, but I think this is not connected:

[chpotato.core.plugins.log] API log: {'page': u'http://HOST/manage/', 't': u'D1nVe7VZ', 'file': u'http://HOST/api/API_KEY/file.cache/mini ... 1363869618', 'line': u'97', 'type': u'error', 'message': u"chrome 25: \nUncaught TypeError: Cannot read property 'parentNode' of null"}

I'm guessing this is something to do with permissions or the file renamer/main.py. In terms of the share, all the drives on the NAS have been granted the same privileges and all have read and write. I'm just surprised that it can rename but fails permissions.

For Reference, this is the /etc/init.d/couchpotato file that starts the application:

#!/bin/sh
### BEGIN INIT INFO
# Provides: CouchPotato
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start CouchPotato at boot time
# Description: Start CouchPotato.
### END INIT INFO
case "$1" in
start)
echo "Starting CouchPotato."
/usr/bin/sudo -u couchpotato -H /usr/local/couchpotato/CouchPotato.py --daemon --data_dir=/var/couchpotato --config_file=/var/couchpot$
;;
stop)
echo "Shutting down CouchPotato."
p=`ps aux | grep -v grep | grep CouchPotato.py | tr -s \ | cut -d ' ' -f 2`
couch_api_key=`grep -m 1 api_key /var/couchpotato/couchpotato.ini | cut -d ' ' -f 3`;
couch_port=`grep -m 1 port /var/couchpotato/couchpotato.ini | cut -d ' ' -f 3`;
wget -q --delete-after http://localhost:${couch_port}/api/${couch_api_key}/app.shutdown
while ps -p $p > /dev/null; do sleep 1; done
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0


Any help or suggestions are greatly appreciated

blueuk808
Posts: 5
Joined: Thu Mar 21, 2013 11:15 am

Re: Errors running Couchpotato post processing

Fri Mar 22, 2013 6:23 pm

Managed to solve issue - it's the permissions on the NAS that cause it - FTP's into the NAS and changed to CHMOD 777. Also, went and checked the permission in the control panel to make sure everything was Read / Write - appears to have worked.

Return to “Media centres”