TypeError: expected str, bytes or os.PathLike object, not bool

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.
kaiserkeiser
Newbie
Newbie
Posts: 12
Joined: November 3rd, 2014, 5:14 pm

TypeError: expected str, bytes or os.PathLike object, not bool

Post by kaiserkeiser »

Hi - SABnzbd has stopped downloading since i updated it to v3.7.0 [b6fd915] on a Syno DS212 DSM 6.2.4-25556 update 6

I run it with Sickbeard. Test connections work.

I updated it in an attempt to stop it from downloading multiple of the same files.

Here's the error I'm getting - hope you can help!

Cheers!

The forum is telling me I can't post links... trying to work out where the link is!

Code: Select all

Traceback (most recent call last):
  File "/volume1/@appstore/sabnzbd/share/SABnzbd/sabnzbd/nzbparser.py", line 319, in process_single_nzb
    nzo = nzbstuff.NzbObject(
  File "..SABnzbd/sabnzbd/nzbstuff.py", line 779, in __init__
    admin_dir = os.path.join(self.download_path, JOB_ADMIN)
  File "../packages/python310/target/lib/python3.10/posixpath.py", line 76, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not bool
User avatar
safihre
Administrator
Administrator
Posts: 5358
Joined: April 30th, 2015, 7:35 am
Contact:

Re: TypeError: expected str, bytes or os.PathLike object, not bool

Post by safihre »

Very strange. Can you update to 3.7.1 package?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
sander
Release Testers
Release Testers
Posts: 8823
Joined: January 22nd, 2008, 2:22 pm

Re: TypeError: expected str, bytes or os.PathLike object, not bool

Post by sander »

anything with letters connected to dots looks like a link the forum ... if you're a user with little posts

The problem is coming from:

Code: Select all

        # Always create the admin-directory, just to be sure
        admin_dir = os.path.join(self.download_path, JOB_ADMIN)
with JOB_ADMIN = "__ADMIN__", so within a incomplete download folder.

My guess is that self.download_path is empty (or bool?! ... weird), so in the SAB gui check Config -> Folders

Code: Select all

>>> import os
>>> os.path.join("blabla", "zzzz") #  good
'blabla/zzzz'

Code: Select all

>>> os.path.join(True, "zzzz") # not good
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.10/posixpath.py", line 76, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not bool
>>>
kaiserkeiser
Newbie
Newbie
Posts: 12
Joined: November 3rd, 2014, 5:14 pm

Re: TypeError: expected str, bytes or os.PathLike object, not bool

Post by kaiserkeiser »

Thanks @sander,

I've checked the download files as configured in SABnszbd:

dr-xr-x---+ 85 sc-sabnzbd sc-download 4096 Dec 14 06:58 complete
dr-xr-x---+ 4 sc-sabnzbd sc-download 77824 Dec 27 08:39 incomplete

these match the config settings in SABnzbn seem to be functioning correctly.

However, I have a scripts folder pointing to /volume1/@appstore/sabnzbd/var/scripts. @appstore is hidden

drwxr-xr-x 58 root root 4096 Dec 27 17:09 @appstore

Am I looking in the correct place?

Thanks,

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

Re: TypeError: expected str, bytes or os.PathLike object, not bool

Post by sander »

Ah ... Synology rights ... great ... ;-)

Code: Select all

dr-xr-x---+ 85 sc-sabnzbd sc-download 4096 Dec 14 06:58 complete
dr-xr-x---+ 4 sc-sabnzbd sc-download 77824 Dec 27 08:39 incomplete
I don't any "w" bits, so no writing rights ... ?

BUT ... I'm not good at Synology rights. The "+" means ACL rights, so I might be wrong.

But, the good news: SAB will check if a directory is writable. So in SAB, go to Folders, move a directory up, and then again to the "complete", and click on Save. If SAB says "download_dir directory: /blabla error accessing" you know you have no writing rights.
kaiserkeiser
Newbie
Newbie
Posts: 12
Joined: November 3rd, 2014, 5:14 pm

Re: TypeError: expected str, bytes or os.PathLike object, not bool

Post by kaiserkeiser »

Thanks again Sander,

I was wondering if I chmod to 777. Is that dangerous?

I have a smidge of Unix knowledge... But I do know a little knowledge can be a dangerous thing... It's bitten me many times in the past.
User avatar
sander
Release Testers
Release Testers
Posts: 8823
Joined: January 22nd, 2008, 2:22 pm

Re: TypeError: expected str, bytes or os.PathLike object, not bool

Post by sander »

On Synology, follow the Synology path. So ... what happens with the test I gave you?
kaiserkeiser
Newbie
Newbie
Posts: 12
Joined: November 3rd, 2014, 5:14 pm

Re: TypeError: expected str, bytes or os.PathLike object, not bool

Post by kaiserkeiser »

Ok, in sabnzbd config, I changed the dir to the level above with both complete and incomplete folders. When hitting save, I get an error accessing message for dir_download directory
kaiserkeiser
Newbie
Newbie
Posts: 12
Joined: November 3rd, 2014, 5:14 pm

Re: TypeError: expected str, bytes or os.PathLike object, not bool

Post by kaiserkeiser »

Sorry, re-reading your last message, I'm not sure I've done what you've asked: on Synology, follow the Synology path.

Sorry if I've misunderstood
kaiserkeiser
Newbie
Newbie
Posts: 12
Joined: November 3rd, 2014, 5:14 pm

Re: TypeError: expected str, bytes or os.PathLike object, not bool

Post by kaiserkeiser »

Hello again

Not sure where we are with this - I may have lost the thread.
User avatar
sander
Release Testers
Release Testers
Posts: 8823
Joined: January 22nd, 2008, 2:22 pm

Re: TypeError: expected str, bytes or os.PathLike object, not bool

Post by sander »

I'm waiting for you: SAB will check if a directory is writable. So in SAB, go to Folders, move a directory up, and then again to the "complete", and click on Save. If SAB says "download_dir directory: /blabla error accessing" you know you have no writing rights.

And that is: in the SAB GUI.
kaiserkeiser
Newbie
Newbie
Posts: 12
Joined: November 3rd, 2014, 5:14 pm

Re: TypeError: expected str, bytes or os.PathLike object, not bool

Post by kaiserkeiser »

My bad - I thought I answered this in the thread. Just tried changing folders to the parent folder again so I can give you the proper error message:

download_dir directory: /volume1/video error accessing

So that's telling us that there are no writing rights... That right? So do I now chmod 777 the /complete and /incomplete folders?
kaiserkeiser
Newbie
Newbie
Posts: 12
Joined: November 3rd, 2014, 5:14 pm

Re: TypeError: expected str, bytes or os.PathLike object, not bool

Post by kaiserkeiser »

And trying to move the folders back, using the GUI to select the folder - the GUI page says Failed where the save button should be - and complete_dir directory: /volume1/video/complete error accessing

so confused right now...
User avatar
sander
Release Testers
Release Testers
Posts: 8823
Joined: January 22nd, 2008, 2:22 pm

Re: TypeError: expected str, bytes or os.PathLike object, not bool

Post by sander »

OK. So we found the probable cause: directory not writable for SABnzbd.

I would not change directory rights via the CLI. That can result in a rabbit hole.

Try to find a solution via the Synology GUI. I can't help you with that.
kaiserkeiser
Newbie
Newbie
Posts: 12
Joined: November 3rd, 2014, 5:14 pm

Re: TypeError: expected str, bytes or os.PathLike object, not bool

Post by kaiserkeiser »

OK - I'll have a go... The owner for these folders is sc-sabnzb and group is sc-download - I don't remember that from before I upgraded. I'm not saying it's changed, just that I don't remember.

Does that seem right to you?
Post Reply