Cannot linked attachment based directory

I installed the latest Zotero on a Windows 10 laptop and tried to like the attachment base directory but got the below error message:

PathUtils.joinRelative: Could not append to path: NS_ERROR_FILE_UNRECOGNIZED_PATH

Can someone please help and instruct how to fix this?
  • Cannot what the linked attachment base directory?

    Can you provide a Debug ID for whatever you're trying to do?
  • When I try to link the attachment base directory I got the above error. (like what the document described here: https://www.zotero.org/support/preferences/advanced#linked_attachment_base_directory)

    Debug ID: D769223604
  • edited April 29, 2025
    OK, you mean set the linked attachment base directory.
    (2)(+0000000): No base attachment path set -- can't resolve 'attachments:/BOOKs/2006_Num[…].pdf'
    I assume you've used a plugin to create linked files previously? You have a file with an invalid relative path that begins with a slash. We'll fix it to not fail on that, but it shouldn't be set to that. You should find the above attachment and try relocating the file or, if that doesn't work, deleting and re-adding the file.

    If you happen to know how you ended up with a path like that, we'd be curious to know.
  • I have thousands of pdf files in the attachment base directory. I try to set up the Zotero on this new laptop so I don't think relink all this pdf file in the library would be a fesiable plan for me.

    I have subfolders in the base directory, and it is a OneDrive folder. Do you reckon this would be the issue? I also tried other random local folders as well, and it gives me the same error.
  • edited April 29, 2025
    As I say, you have a specific file with an invalid path — you can see the beginning of the filename in the error message I quoted above. A relative path should never start with a slash.

    You might have other files with invalid paths, but you should start by fixing that one. Hundreds of files with valid relative paths were processed before that one failed.

    Beyond that, though, you'd need to wait for a fix that ignores the invalid path or try to fix the path using whatever plugin created it originally. (You didn't answer my question about what you used to create these.)
  • Maybe it is this one: http://www.zotfile.com/
    I used it four years ago to name the pdf as my preference. Then I changed the default configuration of Zotero, then did not install it in the later laptop swap.

    And, please tell me how to fix the error path, I could not even find which entry gives the error.
  • You see the beginning of the PDF filename in the error message I quoted above, yes?
  • I see the filename. But I cannot find the file in the base directory. Probably being deleted or moved. So I deleted the entries in the library that probably have the same filename attachment. But after doing this, I still cannot set up the base directory and the debug log does not show any of the invalid path anymore.
  • Note that you have to empty the trash as well after deleting the attachment in question.
  • Ok. It worked. Thanks a lot :)
  • (We've fixed it in the Zotero beta to ignore invalid paths when setting the LABD.)
Sign In or Register to comment.