Jump to content

lutefish

Member
  • Posts

    57
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by lutefish

  1. Hello! I've moved to a new computer, and as I get everything migrated over, a small hiccup. (Well, some big hiccups as Box.com moved everything around, but that's a different question)

     

    Zothero works, broadly (it loads the database, searches it, and can open files and open items in Zotero).

     

    But, when I go to copy citations,I'm encountering a permissions error. Looking at the log file, the text is all there from Zotero, but it's failing to copy.

     

    8:22:05 workflow.py:2114 ERROR    [Errno 13] Permission denied: '/Users/USERNAME/Library/CloudStorage/Box-Box/AlfredSync/Alfred.alfredpreferences/workflows/user.workflow.3181B68E-1DF7-497C-B4A8-A4EF8190FFA8/lib/cite/cite'

    Traceback (most recent call last):
      File "/Users/USERNAME/Library/CloudStorage/Box-Box/AlfredSync/Alfred.alfredpreferences/workflows/user.workflow.3181B68E-1DF7-497C-B4A8-A4EF8190FFA8/lib/workflow/workflow.py", line 2107, in run
        func(self)

     

    Any thoughts? I've checked and Alfred has Automation, Accessibility, and Full Disk access.

     

    Thanks.

  2. FYI, this stopped working (again) after updating to Mac OS 13.

     

    Looking at the debugger gave the following error: 

     

     Code 1: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

     

    Re-loading the Command Line Developer Tools (terminal, xcode-select --install) fixed the issue.

     

  3. OK, that was helpful to know. Thanks. Using the "save to Obsidian" option at least let me specify a finder destination, which resolved the write error which was stopping the workflow.

     

    I had tried posting on GitHub, but the issue was closed there, with the dev saying "use the bug report form", which I had thought was here.

     

    All good - thanks, as always, for the assistance.

     

     

  4. Trying to get this up and working - have installed homebrew and pdfannots2json, re-exported a Zotero library via BetterBibTex, and am getting a mkdir error after choosing a PDF and pasting in the citekey manually.

     

    I'm not sure quite where the read-only directory is becomming an issue. My Zotero library is stored locally, but as "linked" files, not in the Zotero file structure.

     

    Running: 

    Alfred 5.0.3

    PDF Annotation Extractor 7.0.6

    MacOS 12.6

    pdfannots2json version 1.0.12

     

    Thanks.

     

    Trying to get this up and working - have installed homebrew and pdfannots2json, re-exported a Zotero library via BetterBibTex, and am getting a mkdir error after choosing a PDF and pasting in the citekey manually.

    I'm not sure quite where the read-only directory is becomming an issue. My Zotero library is stored locally, but as "linked" files, not in the Zotero file structure.

    [12:04:17.409] Logging Started...
    [12:04:21.628] PDF Annotation Extractor[File Filter] Processing complete
    [12:04:21.630] PDF Annotation Extractor[File Filter] Passing output '/Users/REDACTED/Box Sync/2022/Garnett - 2020 - The Preservation of the Sources for English Mediev.pdf' to Arg and Vars
    [12:04:21.631] PDF Annotation Extractor[Arg and Vars] Processing complete
    [12:04:21.632] PDF Annotation Extractor[Arg and Vars] Passing output '/Users/REDACTED/Box Sync/2022/Garnett - 2020 - The Preservation of the Sources for English Mediev.pdf' to Conditional
    [12:04:21.632] PDF Annotation Extractor[Conditional] Processing complete
    [12:04:21.633] PDF Annotation Extractor[Conditional] Passing output '/Users/REDACTED/Box Sync/2022/Garnett - 2020 - The Preservation of the Sources for English Mediev.pdf' to Arg and Vars
    [12:04:21.633] PDF Annotation Extractor[Arg and Vars] Processing complete
    [12:04:21.634] PDF Annotation Extractor[Arg and Vars] Passing output '' to Keyword
    [12:04:24.625] PDF Annotation Extractor[Keyword] Processing complete
    [12:04:24.626] PDF Annotation Extractor[Keyword] Passing output 'garnettPreservationSourcesEnglish2020' to Replace
    [12:04:24.630] PDF Annotation Extractor[Replace] Processing complete
    [12:04:24.631] PDF Annotation Extractor[Replace] Passing output 'garnettPreservationSourcesEnglish2020' to Arg and Vars
    [12:04:24.631] PDF Annotation Extractor[Arg and Vars] Processing complete
    [12:04:24.632] PDF Annotation Extractor[Arg and Vars] Passing output '/Users/matthew/Box Sync/2022/Garnett - 2020 - The Preservation of the Sources for English Mediev.pdf' to Run Script
    [12:04:24.888] PDF Annotation Extractor[Run Script] Processing complete
    [12:04:24.889] PDF Annotation Extractor[Run Script] Passing output '286;;The Preservation of the Sources for English Medieval History in the Sixteenth Century;;;;Garnett, George;;2020;;inbook;;https://doi.org/10.1093/oso/9780198726166.003.0009
    ' to Conditional
    [12:04:24.890] PDF Annotation Extractor[Conditional] Processing complete
    [12:04:24.890] PDF Annotation Extractor[Conditional] Passing output '286;;The Preservation of the Sources for English Medieval History in the Sixteenth Century;;;;Garnett, George;;2020;;inbook;;https://doi.org/10.1093/oso/9780198726166.003.0009
    ' to Split Arg
    [12:04:24.891] PDF Annotation Extractor[Split Arg] Processing complete
    [12:04:24.891] PDF Annotation Extractor[Split Arg] Passing output '286;;The Preservation of the Sources for English Medieval History in the Sixteenth Century;;;;Garnett, George;;2020;;inbook;;https://doi.org/10.1093/oso/9780198726166.003.0009
    ' to Arg and Vars
    [12:04:24.892] PDF Annotation Extractor[Arg and Vars] Processing complete
    [12:04:24.892] PDF Annotation Extractor[Arg and Vars] Passing output '286' to Conditional
    [12:04:24.893] PDF Annotation Extractor[Conditional] Processing complete
    [12:04:24.893] PDF Annotation Extractor[Conditional] Passing output '286' to Arg and Vars
    [12:04:24.894] PDF Annotation Extractor[Arg and Vars] Processing complete
    [12:04:24.894] PDF Annotation Extractor[Arg and Vars] Passing output '286' to Post Notification
    [12:04:24.895] PDF Annotation Extractor Processing complete
    [12:04:24.895] PDF Annotation Extractor Passing output '286' to Hide Alfred
    [12:04:24.909] PDF Annotation Extractor[Arg and Vars] Passing output '286' to Run Script
    [12:04:24.910] ERROR: PDF Annotation Extractor[Run Script] mkdir: /attachments: Read-only file system
    [12:04:24.910] PDF Annotation Extractor[Run Script] Processing complete
    [12:04:24.911] PDF Annotation Extractor[Run Script] Passing output '' to Conditional
    [12:04:24.911] PDF Annotation Extractor[Conditional] Processing complete
    [12:04:24.912] PDF Annotation Extractor[Conditional] Passing output '' to Post Notification
    [12:04:24.913] PDF Annotation Extractor Processing complete
    [12:04:24.913] PDF Annotation Extractor Passing output '' to Play Sound

  5. @iandol - thanks for drawing attention to that workflow. A quick tinker with it wasn't working for me (I don't actively use Bibtex, even though I've installed the Zotero/Bibtex plugin, so even configuring the workflow to point to my base Zotero directory wasn't finding my library), but I'll definitely keep an eye on it.

     

    On the other hand, this Zotero workflow has started working again, after i changed the Zotero export type back to BetterBibText (I had changed it to a particular style when the workflow stopped working, but changing it back to BBT seems to have resolved the error I was seeing).

     

     

  6. @Giovanni - The last two versions have given me errors, but the version before that worked. Not sure where things are going wrong - seeing this in the logs:

     

    10:51:42 workflow.py:2114 ERROR    UNIQUE constraint failed: data.id
    Traceback (most recent call last):
      File "lib/workflow/workflow.py", line 2107, in run
        func(self)
      File "zh.py", line 754, in main
        return do_search(query)
      File "zh.py", line 135, in do_search
        if app.stale and not running:
      File "lib/zothero/core.py", line 159, in stale
        if self.index.empty:
      File "lib/zothero/core.py", line 152, in index
        self._index.update(self.zotero)
      File "lib/zothero/index.py", line 277, in update
        if not self._update(zot, force):
      File "lib/zothero/index.py", line 405, in _update
        c.execute('INSERT INTO data VALUES (?, ?)',
    sqlite3.IntegrityError: UNIQUE constraint failed: data.id
    10:51:42 workflow.py:2116

  7. First I got a "database locked" error, so I closed Zotero. Now I'm getting a "name 'unicode' is not defined" error.

     

    16:07:51 workflow.py:2114 ERROR    name 'unicode' is not defined
    Traceback (most recent call last):
      File "lib/workflow/workflow.py", line 2107, in run
        func(self)
      File "zh.py", line 721, in main
        return do_search(query)
      File "zh.py", line 131, in do_search
        if app.stale and not running:
      File "lib/zothero/core.py", line 159, in stale
        if self.index.empty:
      File "lib/zothero/core.py", line 152, in index
        self._index.update(self.zotero)
      File "lib/zothero/index.py", line 277, in update
        if not self._update(zot, force):
      File "lib/zothero/index.py", line 325, in _update
        for e in it:
      File "lib/zothero/zotero.py", line 268, in all_entries
        yield self._load_entry(row)
      File "lib/zothero/zotero.py", line 320, in _load_entry
        e.citekey = self.bbt.citekey('{}_{}'.format(e.library, e.key))
      File "lib/zothero/zotero.py", line 195, in bbt
        self._bbt = BetterBibTex(self.datadir)
      File "lib/zothero/betterbibtex.py", line 50, in __init__
        self._refkeys = {
      File "lib/zothero/betterbibtex.py", line 51, in <dictcomp>
        unicode(ck['libraryID']) + '_' + ck['itemKey']: ck['citekey']
    NameError: name 'unicode' is not defined
    16:07:51 workflow.py:2116 INFO     for assistance, see: https://github.com/deanishe/zothero/issues
    16:07:51 workflow.py:2136 DEBUG    ---------- finished in 0.185s ----------
    [16:07:51.785] ZotHero[Script Filter] {
      "items": [

  8. Hmm. Can't attach text files. The log in the cache directory you specificy seems to repeat the same error:

     

    11:28:18 workflow.py:2114 ERROR    [Errno 2] No such file or directory: 'zh.py'
    Traceback (most recent call last):
      File "/Users/USERNAMEREDACTED/Box Sync/AlfredSync/Alfred.alfredpreferences/workflows/user.workflow.FC919AE5-620A-46E9-9D2D-D8DBD4F2580A/lib/workflow/workflow.py", line 2107, in run
        func(self)
      File "/Users/USERNAMEREDACTED/Box Sync/AlfredSync/Alfred.alfredpreferences/workflows/user.workflow.FC919AE5-620A-46E9-9D2D-D8DBD4F2580A/lib/workflow/background.py", line 282, in main
        retcode = subprocess.call(args, **kwargs)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 340, in call
        with Popen(*popenargs, **kwargs) as p:
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 858, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 1704, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: 'zh.py'
    11:28:18 core.py:197 INFO     [core] searching for "mannyng" ...

  9. Installed it, but it's not returning any results, and getting stuck in a loop, displaying "Initializing Search Index".

     

    Forcing a zotconf reload doesn't resolve the issue.

     

    11:13:21 workflow.py:2093 DEBUG    ---------- ZotHero (1.99.0) ----------

    ...

    11:13:21 index.py:153 DEBUG    [index] opened '~/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/giovanni-zothero/search.sqlite'

    11:13:21 background.py:233 DEBUG    [update] command cached: /Users/matthew/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/giovanni-zothero/update.argcache

    11:13:21 background.py:237 DEBUG    [update] passing job to background runner: ['/Library/Developer/CommandLineTools/usr/bin/python3', '-m', 'workflow.background', 'update']

    .

    11:13:21 workflow.py:2093 DEBUG    ---------- ZotHero (1.99.0) ----------

    11:13:21 background.py:243 DEBUG    [update] background job started

    11:13:21 zh.py:133 DEBUG    RUNNING BACKGROUND

    11:13:21 core.py:197 INFO     [core] searching for "mannyng" ...

    11:13:21 index.py:245 INFO     [index] 0 result(s) for 'mannyng'

    11:13:22 workflow.py:2314 DEBUG    set last run version: 1.99.0

    11:13:22 workflow.py:2136 DEBUG    ---------- finished in 0.138s ----------

    [11:13:22.090] ZotHero[Script Filter] {

      "items": [

        {

          "title": "Initialising Search Index \u2026",

          "subtitle": "Your results will appear momentarily",

          "valid": false,

          "icon": {

            "path": "icons/reload.png"

          }

        }

      ],

      "rerun": 0.2

    }

  10. Sigh. I am also unwilling to reinstall Python 2. I am also disappointed by how all of this is playing out. I, also, have installed Raycast and am tinkering with it while confronting what the bottom line line is for my uses of Alfred’s functionality. Mostly, I’m saddened by the confusion and the conflict. Alfred sits at a very odd spot between extremely technical users and technically-proficient-but-still-just-users-users, and the goodwill and support of the community has been such an important part, however fragile it is proving to be. 

  11. Thanks for that. I had already installed Python 2 and added the “fixed” version of the ZotHero workflow, which worked for a while, but after the most recent Mac OS update, the workflow now longer worked. After an hour of messing about, I gave up. I’m a bit bitter, I think, as I had to deal with a project at work that was killed because it relied on Python 2, back when it was EOL in 2020. Ultimately, I decided I wasn’t comfortable with Python 2 on my laptop, and the technical hassle outweighed the benefits. In the process, I did discover Raycast, an Alfred competitor, which has a working Zotero workflow. 

  12. I fear the Python2 underpinnings of ZotHero may be the end of this. It's not @deanishe's responsibility, but rather an inherited framework - again, I want to stress how grateful the community should be for his labors.

     

    I spent a few hours trying to sort out the various errors after updating MacOS to 12.3 (and the removal of Python2), but I'm really not a programmer - all of the unicode handling seems to be wrong now, and lots of the modules imported have been renamed/updated. 

     

    I'm sad - ZotHero is my fundamental, favorite Alfred workflow, but it's clearly a pretty niche audience. If there was enough interest, we might have options, but I have no sense of how many actually use, or rely, on the workflow. 

×
×
  • Create New...