Page 1 of 1

cherrypy problems with sabnzbd and freebsd

Posted: March 17th, 2008, 1:58 pm
by eydaimon
I was getting this error:
...SNIP...Traceback (most recent call last):
File "./SABnzbd.py", line 587, in
main()
File "./SABnzbd.py", line 559, in main
'/sabnzbd/static': {'staticFilter.on': True, 'staticFilter.dir': os.path.join(web_dir, 'static')}
TypeError: update() got an unexpected keyword argument 'updateMap'
I had two versions of cherry-py, 2.2.1 and 3.0.2
So I uninstalled 3.0.2

Now I get this error:
...SNIP...
16/Mar/2008:12:04:18 CONFIG INFO   server.thread_pool: 10
Exception in thread CPHTTPServer Thread-6:
Traceback (most recent call last):
  File "/usr/local/lib/python2.5/threading.py", line 486, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.5/threading.py", line 446, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.5/site-packages/cherrypy/_cpserver.py", line 114, in _start_http
    self.httpserver.start()
  File "/usr/local/lib/python2.5/site-packages/cherrypy/_cpwsgiserver.py", line 295, in start
    if self.socket:
AttributeError: 'WSGIServer' object has no attribute 'socket'
So I install 3.0.2 and then I get this error:
$ SABnzbd.py
Traceback (most recent call last):
  File "/usr/local/bin/SABnzbd.py", line 26, in
    import sabnzbd
  File "/usr/local/lib/python2.5/site-packages/sabnzbd/__init__.py", line 37, in
    from sabnzbd.assembler import Assembler, PostProcessor
  File "/usr/local/lib/python2.5/site-packages/sabnzbd/assembler.py", line 37, in
    from sabnzbd.interface import CheckFreeSpace
  File "/usr/local/lib/python2.5/site-packages/sabnzbd/interface.py", line 38, in
    from cherrypy.filters.gzipfilter import GzipFilter
ImportError: No module named filters.gzipfilter
According to a post, here, only 2.2.1 should work, so I have stopped trying with 3.0.2. Anyway, I'm at a bit of a loss.
$ python -V
Python 2.5.2
$ uname -a
FreeBSD  7.0-STABLE FreeBSD 7.0-STABLE
I have tried using both python 2.4.x and 2.5.x (2.5.1 and 2.5.2)

Re: cherrypy problems with sabnzbd and freebsd

Posted: March 17th, 2008, 3:15 pm
by switch
SABnzbd only works with cherrypy 2.2.1-2.3. None of the cherrypy 3.x versions are supported as there are some fundamental changes.

SABnzbd as of 0.3.3 should now include a copy of cherrypy to stop any of these version conflicts from happening.
Can you please state what SABnzbd version you are using so I can help.

Re: cherrypy problems with sabnzbd and freebsd

Posted: March 17th, 2008, 3:45 pm
by eydaimon
As my post indicated, I'm aware only 2.2.1 would work, but I had tried all combinations anyway.

So here's what I have installed on my system:

py25-cherrypy-old-2.2.1,1
python25-2.5.2_1
sabnzbdplus-0.3.3

Removing the system cherrypy installation and using only the bundled cherrypy does not solve the problem. I tried.

The below errors are what I get either way.
17/Mar/2008:13:42:54 CONFIG INFO  server.thread_pool: 10
Exception in thread CPHTTPServer Thread-6:
Traceback (most recent call last):
  File "/usr/local/lib/python2.5/threading.py", line 486, in __bootstrap_inner    self.run()
  File "/usr/local/lib/python2.5/threading.py", line 446, in run
    self.__target(*self.__args, **self.__kwargs)  File "/usr/home/debonair/myports/sabnzbdplus-0.3.3/work/SABnzbd-0.3.3/cherrypy
/_cpserver.py", line 114, in _start_http    self.httpserver.start()
  File "/usr/home/debonair/myports/sabnzbdplus-0.3.3/work/SABnzbd-0.3.3/cherrypy/_cpwsgiserver.py", line 295, in start
    if self.socket:
AttributeError: 'WSGIServer' object has no attribute 'socket'

^C2008-03-17 13:42:55,679::WARNING::[sabnzbd] Signal 2 caught, saving and exiting...
2008-03-17 13:42:55,680::INFO::[nzbqueue] Saving queue

Re: cherrypy problems with sabnzbd and freebsd

Posted: March 17th, 2008, 4:18 pm
by switch
CherryPy looks to be unable to create a socket. You mention you have tried different versions of python, which may rule out a bad build.

I would recommend trying with cherrypy 2.3 http://download.cherrypy.org/cherrypy/2.3.0/ overwrite SABnzbd-0.3.3/cherrypy/ if you must.
This may not fix your issue, but this version of cherrypy seems to have better error handling and logging around this issue which will help in further debugging the cause.

Sorry I can't be of more help.

Re: cherrypy problems with sabnzbd and freebsd

Posted: March 17th, 2008, 5:24 pm
by eydaimon
It actually did fix the issue. It worked straight off the bat with 2.3.0. Thanks!

For anyone else reading this, steps I took:

1. cd sabnzbd dir
2. wget http://download.cherrypy.org/cherrypy/2 ... 3.0.tar.gz
3. tar xvfz CherryPy-2.3.0.tar.gz
4. python CherryPy-2.3.0/setup.py  build
5. mv cherrypy cherrypy.old
6. cp -rvp build/lib/cherrypy .
7. python SABnzbd.py
8. enjoy!

Re: cherrypy problems with sabnzbd and freebsd

Posted: March 17th, 2008, 8:39 pm
by eydaimon
I figured out the source of the problem. I had something bad in my config file that was not compatible.

So cherrypy 2.3.0 is not necessary, 2.2.1 works fine.