Python problem?

Report & discuss bugs found in 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
meredith102
Newbie
Newbie
Posts: 4
Joined: April 29th, 2021, 10:08 am

Python problem?

Post by meredith102 »

My system is slackware 64 current, and python versions are 2 . 7 . 18 and 3 . 9 . 4

I have tried both 3 . 2 . 1 and 3 . 3 . 0 beta 3, and both display the same problem.

If I run from the icon, the program crashes instantly. If I run it from a command prompt, I am told there is a syntax error in the file (prog) . py at line 128.

(Sorry if this looks a bit odd, but the board keeps telling me I'm not allowed to post links - even though there are none! I'm really struggling to discover what it thinks is a link!!!)

Any pointers gratefully received!

User avatar
sander
Release Testers
Release Testers
Posts: 7482
Joined: January 22nd, 2008, 2:22 pm

Re: Python problem?

Post by sander »

You must start SABnzbd like this:

python3 SABnzbd.py


If that that doesn't work, post your full log on https://pastebin.com/ and paste the URL (with spaces around the dots) here.

meredith102
Newbie
Newbie
Posts: 4
Joined: April 29th, 2021, 10:08 am

Re: Python problem?

Post by meredith102 »

OK, thanks for the tip! I'll have a look in the morning and report back.

--
Pete

meredith102
Newbie
Newbie
Posts: 4
Joined: April 29th, 2021, 10:08 am

Re: Python problem?

Post by meredith102 »

Yes, that was it! Did I miss that in the documentation somewhere? I was also missing a python plug-in (cheetah), but the error message helpfully pointed me to the wiki which told me how to fix it.

Many thanks!

--
Pete

User avatar
sander
Release Testers
Release Testers
Posts: 7482
Joined: January 22nd, 2008, 2:22 pm

Re: Python problem?

Post by sander »

Great.

With SABnzbd 3.0.0 and higher, you must use python3. That's all.
running from source https://sabnzbd.org/wiki/installation/i ... ff-modules

meredith102
Newbie
Newbie
Posts: 4
Joined: April 29th, 2021, 10:08 am

Re: Python problem?

Post by meredith102 »

Yes, I knew it had to use python 3, but foolishly thought it would default to that. I think Slackware just keeps python 2 on board for compatibility reasons with some software.

Anyway, all sorted now, so many thanks!

BTW, the "link" the forum was objecting to was sabnzbd (dot) py! Took me ages to work it out...!

--
Pete

User avatar
sander
Release Testers
Release Testers
Posts: 7482
Joined: January 22nd, 2008, 2:22 pm

Re: Python problem?

Post by sander »

"python" is ambiguous: it is often python2 (for historical reasons), sometimes it might point to python3

So best (as in: unambiguous) to specify python3. That always works.

But the good news: the first line of SABnzbd.py itself says "#!/usr/bin/python3 -OO", so normally on POSIX (which honors that first line), you can start SAB with "./SABnzbd.py". That works ... if /usr/bin/python3 does exist ... which is often the case.

Post Reply