CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Got a program that plays well with SABnzbd? Share it here!
conj
Newbie
Newbie
Posts: 4
Joined: July 26th, 2010, 7:33 am

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Post by conj »

Hi guys,
I have been playing around for a few days trying to run Couch Potato on FreeNas. The first lot of errors I was getting were related to the CouchPotato.log file missing, creating a empty file /logs/CouchPotato.log seemed to prevented this. The next error I was this:

Code: Select all

freenas:/usr/local/bin/.couchpotato# python2.6 /usr/local/bin/.couchpotato/CouchPotato.py
Traceback (most recent call last):
  File "/usr/local/bin/.couchpotato/CouchPotato.py", line 41, in <module>
    from app.config.db import initDb
  File "/usr/local/bin/.couchpotato/app/config/db.py", line 16, in <module>
    engine = create_engine('sqlite:///%s' % path)
  File "/usr/local/bin/.couchpotato/library/sqlalchemy/engine/__init__.py", line 241, in create_engine
    return strategy.create(*args, **kwargs)
  File "/usr/local/bin/.couchpotato/library/sqlalchemy/engine/strategies.py", line 60, in create
    dbapi = dialect_cls.dbapi(**dbapi_args)
  File "/usr/local/bin/.couchpotato/library/sqlalchemy/dialects/sqlite/pysqlite.py", line 208, in dbapi
    raise e
ImportError: No module named pysqlite2
 
This error was caused by a missing module, after hours on google I still couldn't find a way to install the python2.6 packages required by CP. All out of ideas at this point, I decided to do something silly and copy all the site-packages from python 2.5 into python 2.6. CP now looks like it is trying to start up but coming up with a odd error(code sec below), Just wondering if anyone knows what this error means or has any ideas how I could get it working.

Code: Select all

freenas:/usr/local/bin/.couchpotato# python2.6 /usr/local/bin/.couchpotato/CouchPotato.py
[27/Jul/2010:19:52:03] ENGINE Listening for SIGHUP.
[27/Jul/2010:19:52:03] ENGINE Listening for SIGTERM.
[27/Jul/2010:19:52:03] ENGINE Listening for SIGUSR1.
[27/Jul/2010:19:52:03] ENGINE Bus STARTING
[27/Jul/2010:19:52:03] ENGINE Started monitor thread '_TimeoutMonitor'.
[27/Jul/2010:19:52:04] ENGINE Error in 'start' listener <bound method Updater.start of <app.config.updater.Updater object at 0x2923d90c>>
Traceback (most recent call last):
  File "/usr/local/bin/.couchpotato/cherrypy/process/wspbus.py", line 176, in publish
    output.append(listener(*args, **kwargs))
  File "/usr/local/bin/.couchpotato/app/config/updater.py", line 43, in start
    self.checkForUpdate()
  File "/usr/local/bin/.couchpotato/app/config/updater.py", line 86, in checkForUpdate
    update = self.checkForUpdateUnix()
  File "/usr/local/bin/.couchpotato/app/config/updater.py", line 96, in checkForUpdateUnix
    data = urllib2.urlopen(self.url, timeout = self.timeout)
TypeError: urlopen() got an unexpected keyword argument 'timeout'

[27/Jul/2010:19:52:04] ENGINE Serving on 0.0.0.0:5000
[27/Jul/2010:19:52:04] ENGINE Shutting down due to error in start listener:
Traceback (most recent call last):
  File "/usr/local/bin/.couchpotato/cherrypy/process/wspbus.py", line 213, in start
    self.publish('start')
  File "/usr/local/bin/.couchpotato/cherrypy/process/wspbus.py", line 193, in publish
    raise exc
ChannelFailures: TypeError("urlopen() got an unexpected keyword argument 'timeout'",)

[27/Jul/2010:19:52:04] ENGINE Bus STOPPING
[27/Jul/2010:19:52:04] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 5000)) shut down
[27/Jul/2010:19:52:04] ENGINE Stopped thread '_TimeoutMonitor'.
[27/Jul/2010:19:52:19] ENGINE Bus STOPPED
[27/Jul/2010:19:52:19] ENGINE Bus EXITING
[27/Jul/2010:19:52:19] ENGINE Bus EXITED
HungryBUTTON
Newbie
Newbie
Posts: 14
Joined: July 26th, 2010, 6:18 am

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Post by HungryBUTTON »

@conj

Grab the latest source from GIT as it fixes the log creation (UPDATE: ITS BROKEN FOR ME NOW TOO)

In regards to the last 2 errors i think it is because Python is not installed correctly
Did you use ports to install Python 2.6
Last edited by HungryBUTTON on July 27th, 2010, 6:29 am, edited 1 time in total.
HungryBUTTON
Newbie
Newbie
Posts: 14
Joined: July 26th, 2010, 6:18 am

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Post by HungryBUTTON »

@RuudBurger
In the latest update the logs do not work anymore.
When i click on Logs in the UI it spits out the following message.

Code: Select all

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
  File "/etc/CouchPotato/cherrypy/_cprequest.py", line 660, in respond
    response.body = self.handler()
  File "/etc/CouchPotato/cherrypy/lib/encoding.py", line 193, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/etc/CouchPotato/app/config/render.py", line 13, in __call__
    env.update(self.next_handler())
  File "/etc/CouchPotato/cherrypy/_cpdispatch.py", line 25, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/etc/CouchPotato/app/controllers/log.py", line 29, in index
    f = open(fileAbs, 'r')
IOError: [Errno 2] No such file or directory: '/logs/CouchPotato.log'
conj
Newbie
Newbie
Posts: 4
Joined: July 26th, 2010, 7:33 am

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Post by conj »

Thanks Hungry I'll grab that now.

yeah I thought that might be the problem. I install python2.6 using the command "pkg_add python2.6" then I copied the 2.5 python packages into 2.6,  how do I install using ports?
RuudBurger
Sr. Member
Sr. Member
Posts: 305
Joined: July 2nd, 2010, 6:11 am

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Post by RuudBurger »

@HungryBUTTON
Should be fixed

@conj
Copying python 2.5 won't work as there is some stuff that I use that is only available in python 2.6 ;)
CouchPotato - Automatic Movie Downloader
For bugs & feature request go to Lighthouse. For questions & problems go to our support forum
HungryBUTTON
Newbie
Newbie
Posts: 14
Joined: July 26th, 2010, 6:18 am

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Post by HungryBUTTON »

@conj

FreeNAS is based off free BSD so bascially just SSH in type #sysinstall then choose Configure -> Distributions -> Ports

Once Ports is installed then do the following

# cd /usr/ports/lang/python26 && make install
conj
Newbie
Newbie
Posts: 4
Joined: July 26th, 2010, 7:33 am

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Post by conj »

I don't think sysinstall is a part of freenas, i think it should be located in stand/sysinstall but i cant seem to find that folder either.

Code: Select all

freenas:~# #sysinstall
#sysinstall: Command not found.
freenas:~# sysinstall
sysinstall: Command not found.

Would I just able download the ports version on python2.6 and install it without Ports?

Thanks again 
Halfwit
Newbie
Newbie
Posts: 2
Joined: July 27th, 2010, 8:23 am

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Post by Halfwit »

No problems running Couch Potato itself, but something seems wonky with the link-up between the program and NZBs.org.  The first time I run a search, I consistently get an error message:

Code: Select all

00:55:50,673 ERROR [app.lib.provider.yarr.sources.nzbs] Failed to open http://nzbs.org/rss.php?catid=4&i=USERID&h=API KEY&age=600&q=SEARCH TERM&action=search.
If I run the search again it works, and tells me that the NZB was sent to SAB. When I open up SABnzbd, though, the actual "file" being downloaded is a 0B file named:

Code: Select all

index.php!action=getnzb&nzbid=353207&i=USERID&h=API KEY[code]

Basically, it's creating the URL for an action, but it's sending it to SABnzbd as though that url is the actual file.

I'm running Couch Potato R17 on Windows 7, using SABnzbd .5.3.  If I manually run the original search and send the nzb, Couch Potato can properly process the file on the back end once I delete the URL from my download queue.
[/code]
RuudBurger
Sr. Member
Sr. Member
Posts: 305
Joined: July 2nd, 2010, 6:11 am

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Post by RuudBurger »

When you add the nzb.org/rss.php url to your SAB manually, does it work?
CouchPotato - Automatic Movie Downloader
For bugs & feature request go to Lighthouse. For questions & problems go to our support forum
Vernoz
Newbie
Newbie
Posts: 1
Joined: July 27th, 2010, 8:48 am

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Post by Vernoz »

My apologies if this has been asked before but I searched back a few pages and didn't see it.

How is the Soon page supposed to function?  Is it a list of all upcoming DVD releases or just parsed by what movies are in my Wanted list?  I ask because if I click refresh for updates on the Soon page, it just sits there and nothing is ever displayed.  I thought perhaps it would be an RSS feed of upcoming dvds or something along those lines but I don't want to presume.

Thanks for any clarification and for the excellent program, I love everything so far and its really made my movie watching life easier.
RuudBurger
Sr. Member
Sr. Member
Posts: 305
Joined: July 2nd, 2010, 6:11 am

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Post by RuudBurger »

For now its only the "soon movies" in your wanted list.
But I wat to make it a portal for new movies, highly rated via rottentomato and scenereleases etc.
CouchPotato - Automatic Movie Downloader
For bugs & feature request go to Lighthouse. For questions & problems go to our support forum
Halfwit
Newbie
Newbie
Posts: 2
Joined: July 27th, 2010, 8:23 am

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Post by Halfwit »

RuudBurger wrote: When you add the nzb.org/rss.php url to your SAB manually, does it work?
Hmm... it does not. I set up the initial search as an RSS feed in SAB, added a filter to get a single result, and hit "force download".  It moves the correct "title," but it's still a 0B file with an "age" of 14817d.

Thanks:  looks like may be a problem with SABnzbd, or my settings in SABnzbd.
User avatar
rascalli
Moderator
Moderator
Posts: 656
Joined: January 18th, 2008, 12:30 am
Location: Bossche bollen land

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Post by rascalli »

RuudBurger wrote: For now its only the "soon movies" in your wanted list.
But I wat to make it a portal for new movies, highly rated via rottentomato and scenereleases etc.
sounds good , so we can manually add it to our WANT list ?
RuudBurger
Sr. Member
Sr. Member
Posts: 305
Joined: July 2nd, 2010, 6:11 am

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Post by RuudBurger »

Yes, with just a few clicks.
CouchPotato - Automatic Movie Downloader
For bugs & feature request go to Lighthouse. For questions & problems go to our support forum
Jim
Newbie
Newbie
Posts: 49
Joined: October 31st, 2009, 10:15 am

Re: CouchPotato - Automatic Movie Downloader via NZB & Torrents!

Post by Jim »

great script!

are you going to add subtitle selection?
that would be excellent.
Post Reply