Comments (9)
I'm sure this is on me,
I managed to get the debug output, though the error still occurs.
relevant bits:
saving credentials to keyring
keyring_utils.py:71 save_keyring_credentials() -- storing "DELETED" to keyring mhucka.zowie
zotero.py:91 init() -- connecting to Zotero as user DELETED
main_body.py:78 run() -- exception in main body: tuple index out of range
main_body.py:80 run() -- finished MainBody
main.py:272 main() -- main body raised exception: (<class 'IndexError'>, IndexError('tuple index out of range'), <traceback object at 0x10af63908>)
cli.py:99 _print_or_queue() -- Encountered error IndexError: tuple index out of range
Encountered error IndexError: tuple index out of range
main.py:288 main() -- Exception: tuple index out of range
Traceback (most recent call last):
File "/Users/DELETED/.pyenv/versions/3.7.3/lib/python3.7/site-packages/zowie/main_body.py", line 75, in run
self._do_preflight()
File "/Users/DELETED/.pyenv/versions/3.7.3/lib/python3.7/site-packages/zowie/main_body.py", line 130, in _do_preflight
if len(self.files) > 1 or path.isdir(self.files[0]):
IndexError: tuple index out of range
from zowie.
Thanks for the report! I see the reason for the error (it's a bug -- it's not testing for a empty self.files before trying to index into it), but from the discussion on the DEVONthink forums, it sounds like the location you are trying to use is empty, which will still be a problem even after this bug is fixed. Can you tell me more about your Zotero setup? Specifically, where do the PDF files for your library live? See the Preferences, under Advanced, "Files and Folders", like the screenshot here – it would help me to know the data directory location in your setup:
from zowie.
Well, it's good to know it isn't just me.
All the PDFs for my Zotero library are synced across all my devices by Box.com (provided by UCLA, where I'm faculty), which appears and functions as a regular folder in the MacOS Finder. (If anything, it avoids some of the annoying issues with iCloud requiring under-used files redownload). So, my Zotero library is in the default location, but every PDF is a "linked" attachment, and distributed across perhaps a dozen subfolders below ~/Box Sync/. So, that's the Zotero base directory. The data directory is in the default location.
Anyway, thanks for looking into the bug / issue. DevonThink is made even more amazing by having such an interested and interesting development community.
from zowie.
The bug caused Zowie to not complain about a missing argument. I'm fixing that now and will produce a version 1.1.1. Once that's fixed, can you try it again with something like the following?
zowie ~/Box\ Sync
or if you only want it to act on PDF files,
zowie -f pdf ~/Box\ Sync
(note the backslash for quoting of the space in the pathname). Unfortunately I've never used this "linked attachment" scheme so I don't even know what the structure looks like inside that directory. If it's full of symbolic links, we may find out it won't work without additional changes. But let's fix this argument parsing problem first.
from zowie.
OK, version 1.1.1 is out there, if you want to give it a try. (Whenever – no rush.)
from zowie.
from zowie.
Shoot, that's too bad. The way Zowie figures out the record associated with a given PDF file is that in the other Zotero storage option, the files are in subdirectories keyed by a unique identifier, like ..../Z743PE2/some filename.pdf
. Thanks to that, it's possible to ask the Zotero API about Z743PE2
. Without that, I don't know how to infer the record associated with a given file.
from zowie.
I'll ask on the Zotero forums. Maybe there's a way to do it.
In the meantime, I'm going to close this issue, as it appears the original reason (the error that arose when no argument was given) has been resolved.
Update: the Zotero forum question is at https://forums.zotero.org/discussion/comment/372519/#Comment_372519
from zowie.
Fixed in release 1.1.1.
from zowie.
Related Issues (20)
- Doesn't work with linked attachments? HOT 6
- Problem running script in Devonthink HOT 12
- sh: zowie: command not found when applying smart rule HOT 4
- -d option can't be used wit ~/Zotero folder HOT 4
- Write zotero select link on top of each PDF page
- Question—Is Zowie necessary with Zotero 6? HOT 2
- Suggest to loosen the dependency on boltons HOT 1
- Question: using DevonThink ToGo to read / comment / index Zotero files? HOT 2
- Error installing zowie with pipx HOT 3
- New Failure: ImportError: cannot import name '_objc' from partially initialized module 'objc' (most likely due to a circular import) HOT 4
- Messages about database lookup errors do not indicate which file is at fault HOT 1
- Sonoma
- Update to Python 3.12?
- Allow use with other files besides PDFs HOT 1
- Find itemkey based on SQLite database HOT 1
- Would it be possible to hijack this tool to insert devonthink tags into zotero tags, and vice versa? HOT 3
- Trying a new username id HOT 5
- Zowie for ms windows HOT 2
- Python Error with sidetracked? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zowie.