SyntaxError: invalid syntax

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
nishiyama
Newbie
Newbie
Posts: 5
Joined: December 1st, 2014, 2:01 am

SyntaxError: invalid syntax

Post 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?
User avatar
sander
Release Testers
Release Testers
Posts: 9264
Joined: January 22nd, 2008, 2:22 pm

Re: SyntaxError: invalid syntax

Post 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
nishiyama
Newbie
Newbie
Posts: 5
Joined: December 1st, 2014, 2:01 am

Re: SyntaxError: invalid syntax

Post 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.
User avatar
sander
Release Testers
Release Testers
Posts: 9264
Joined: January 22nd, 2008, 2:22 pm

Re: SyntaxError: invalid syntax

Post by sander »

Good to hear.

Do you use Ubuntu, or Debian, or ... ?
nishiyama
Newbie
Newbie
Posts: 5
Joined: December 1st, 2014, 2:01 am

Re: SyntaxError: invalid syntax

Post 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?
User avatar
sander
Release Testers
Release Testers
Posts: 9264
Joined: January 22nd, 2008, 2:22 pm

Re: SyntaxError: invalid syntax

Post 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"
User avatar
sander
Release Testers
Release Testers
Posts: 9264
Joined: January 22nd, 2008, 2:22 pm

Re: SyntaxError: invalid syntax

Post 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.
nishiyama
Newbie
Newbie
Posts: 5
Joined: December 1st, 2014, 2:01 am

Re: SyntaxError: invalid syntax

Post by nishiyama »

Yeah I may need to replace the card at some point though all my downloads will be going to 3TB external HD.
Post Reply