Page 1 of 2

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

Posted: January 13th, 2023, 12:30 pm
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

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

Posted: January 13th, 2023, 3:35 pm
by safihre
Very strange. Can you update to 3.7.1 package?

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

Posted: January 13th, 2023, 3:44 pm
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
>>>

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

Posted: January 15th, 2023, 4:54 am
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

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

Posted: January 15th, 2023, 5:29 am
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.

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

Posted: January 15th, 2023, 5:37 am
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.

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

Posted: January 15th, 2023, 5:40 am
by sander
On Synology, follow the Synology path. So ... what happens with the test I gave you?

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

Posted: January 15th, 2023, 5:49 am
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

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

Posted: January 15th, 2023, 10:23 am
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

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

Posted: January 17th, 2023, 3:09 pm
by kaiserkeiser
Hello again

Not sure where we are with this - I may have lost the thread.

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

Posted: January 17th, 2023, 3:17 pm
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.

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

Posted: January 17th, 2023, 4:11 pm
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?

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

Posted: January 17th, 2023, 4:26 pm
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...

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

Posted: January 17th, 2023, 4:31 pm
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.

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

Posted: January 17th, 2023, 4:36 pm
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?