-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zotfile incompatability again #33
Comments
Sorry you're having issues @mpea413. Did you configure I've never used zotfile and not sure what it is, and this other issue you mentioned is 5 years old so the details aren't fresh. There's really not much you've provided to help me with your problem. Will you please send a stack trace. Thanks in advance. |
Thanks for getting back so quick! Yes, I did try both the file_mapping = long and file_mapping = item and file_mapping = BART. Zotfile will rename and move the attached .pdfs to another location, so all the .pdfs can be in one spot. It is useful for large collections of .pdfs and for easily having access to them external to zotero. My apologies. Yes, I will try and send a stack trace and ideally make a small test setup that can be easily shared. Will try figure it myself as well. |
If you're getting the same results by changing those values, it could be the program isn't finding the configuration file. I'd try running the program with an explicit |
Thank you. I did try that and yes, it does seem to be reading the config file I gave it. For now I have made it work by hacking the "path" function at line 146 of: I did this by forcing it to enter the conditional with the comment "# assume ZoteroFile is used" and prepending my local "Linked Attachment Base Directory" setting (from Zotero Preferences:Advanced) to the path, after first removing the "attachments:" part of itemAttachments:path. I think there might be a bug (? at least in my usecase ?) in line 160 ish of domain.py, because it didn't seem to enter the conditional code "# assume ZoteroFile is used" . This is because there's always a "storage:" or "attachments:" prepended to the path. I think what I need in my case is something special done in the "attachments:" case. I'll work on trying to make the hack neater and for this usecase over the next week. It might require an extra line in the config file to give the "Linked Attachment Base Directory" as I think this is stored in the Zotero preferences(.js) file and not the SQLite database. I tried to get the log file by setting the log file level with "--level" but I can't find where the log file is saved for zotsite. My apologies, I'm not really sure how the mechanics of "debugging / adding to open source software helpfully" works. At the moment I'm kinda treating this issue as a bit of a log for the discoveries I've made. Please let me know what the correct procedure is. For instance I can close this if needed. Thanks again for writing really useful software and making it available. :-) Have a good day. |
Hi @mpea413, Thanks for looking at this and reporting on what you found, I'm sure it will help others using ZoteroFile in the future. Regarding changes: one idea is to add this path that you've set as a configuration option instead of just branching on the formatting of the storage string. We could do that, but that means making changes to thread that configuration into this strategy (GoF patterns) class. I'd be willing to do that if there were more requests for this feature, but you're only the second one in 4 years now that's reported issues using ZoteroFile. This and the fact that you mentioned it could be an edge case given your setup/configuration deprioritizes these changes in my mind. However, if you want to make these changes yourself that would be general enough for others to use, please submit a pull request. Regarding the Thanks for the nice comment about the software--these comments make it worth it! |
I'm having exactly the same issue as what was reported here:
#8
But I'm using zotsite version 0.9.1, with zotfile installed this year (2024) and Zotero version 6.0.30
When I export a collection that has .pdfs that have not been moved by zotfile it works fine.
However any items that do have attached .pdfs moved with zotfile fail with a FileNotFoundErrror, such as:
FileNotFoundError: [Errno 2] No such file or directory: '/home/m/Zotero/storage/73T7AU4N/Conference Paper/.pdf'
Showing that it seems to be mixing the original zotero storage with the zotfile path (as I have it put it into a directory by type, so Journals are in a folder, Thesis are in a folder etc).
The text was updated successfully, but these errors were encountered: