Page 1 of 1

SyntaxError: invalid syntax

Posted: December 1st, 2014, 2:05 am
by nishiyama
Hello all,

I am getting a SyntaxError when I attempt to start up my server. My python version is 2.7.3:

Code: Select all

$ sudo sabnzbdplus --server 0.0.0.0
Traceback (most recent call last):
  File "/usr/bin/sabnzbdplus", line 44, in <module>
    import cherrypy
  File "/usr/share/sabnzbdplus/cherrypy/__init__.py", line 159, in <module>
    from cherrypy import _cpdispatch as dispatch
  File "/usr/share/sabnzbdplus/cherrypy/_cpdispatch.py", line 164, in <module>
    import inspect
  File "/usr/lib/python2.7/inspect.py", line 241
    or ismethoddescripto?????((???????????????????(???????H???????????????????????????????????????????	
                        ^
SyntaxError: invalid syntax
Anyone know what I can do to fix the issue?

Re: SyntaxError: invalid syntax

Posted: December 1st, 2014, 2:08 am
by sander
There is something wrong with your file /usr/lib/python2.7/inspect.py . This is what it should look like:

Code: Select all

sander@flappie:~$ cat /usr/lib/python2.7/inspect.py | grep -in ismethod | grep 241
241:            or ismethoddescriptor(object))
You have garbage in that line.

Remove and reinstall python

Re: SyntaxError: invalid syntax

Posted: December 1st, 2014, 2:37 am
by nishiyama
Thanks for that I removed my python

Code: Select all

sudo apt-get remove python2.7
Clean up

Code: Select all

sudo apt-get autoremove
Re-installed

Code: Select all

sudo apt-get install python2.7
Then I had to re-install sabnzbdplus as it was removed with the python removal

Code: Select all

sudo apt-get install sabnzbdplus
And the server ran with

Code: Select all

sabnzbdplus --server 0.0.0.0
I went to the ip of my server and it brought the wizard up this time. Thanks again for the response.

Re: SyntaxError: invalid syntax

Posted: December 1st, 2014, 2:56 am
by sander
Good to hear.

Do you use Ubuntu, or Debian, or ... ?

Re: SyntaxError: invalid syntax

Posted: December 1st, 2014, 3:12 pm
by nishiyama
On my raspberry pi using the raspbian os which is based on Debian. Im still going through getting it all up and running with headphones, sickbeard, couchpotato, and deluge. This is at least one hurdle completed.

Have you set up your sabnzbd to autostart?

Re: SyntaxError: invalid syntax

Posted: December 1st, 2014, 3:49 pm
by sander
nishiyama wrote: Have you set up your sabnzbd to autostart?
Yes. See http://wiki.sabnzbd.org/install-ubuntu-repo under "How to run as a service"

Re: SyntaxError: invalid syntax

Posted: December 1st, 2014, 3:50 pm
by sander
nishiyama wrote:On my raspberry pi
Ah, so a flash card. Based on the file corruption you got, I wouldn't trust your flash card anymore.

Re: SyntaxError: invalid syntax

Posted: December 1st, 2014, 6:26 pm
by nishiyama
Yeah I may need to replace the card at some point though all my downloads will be going to 3TB external HD.