zothero icon indicating copy to clipboard operation
zothero copied to clipboard

TypeError: 'NoneType' object is not subscriptable

Open cocoaaa opened this issue 3 months ago • 1 comments

Hi, I love using zothero but recently started to encounter the error below. I get this error everytime I trigger search using zothero (ie., on Alfred, trigger zot <search term>). Could you help me resolve this issue? I'd appreciate any suggestion to try. Thanks!

19:31:24 workflow.py:2114 ERROR    'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/Users/h/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.3728177E-CDB0-4919-A240-758DF5920969/lib/workflow/workflow.py", line 2107, in run
    func(self)
  File "/Users/h/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.3728177E-CDB0-4919-A240-758DF5920969/zh.py", line 734, in main
    return do_search(query)
           ^^^^^^^^^^^^^^^^
  File "/Users/h/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.3728177E-CDB0-4919-A240-758DF5920969/zh.py", line 130, in do_search
    if app.stale and not running:
       ^^^^^^^^^
  File "/Users/h/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.3728177E-CDB0-4919-A240-758DF5920969/lib/zothero/core.py", line 166, in stale
    if self.index.empty:
       ^^^^^^^^^^
  File "/Users/h/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.3728177E-CDB0-4919-A240-758DF5920969/lib/zothero/core.py", line 159, in index
    self._index.update(self.zotero)
  File "/Users/h/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.3728177E-CDB0-4919-A240-758DF5920969/lib/zothero/index.py", line 277, in update
    if not self._update(zot, force):
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/h/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.3728177E-CDB0-4919-A240-758DF5920969/lib/zothero/index.py", line 325, in _update
    for e in it:
  File "/Users/h/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.3728177E-CDB0-4919-A240-758DF5920969/lib/zothero/zotero.py", line 286, in modified_since
    if self.entry(row['key'])["id"] not in modified_ids:
       ~~~~~~~~~~~~~~~~~~~~~~^^^^^^
TypeError: 'NoneType' object is not subscriptable
19:31:24 workflow.py:2116 INFO     for assistance, see: https://github.com/giovannicoppola/zothero/issues
19:31:24 workflow.py:2136 DEBUG    ---------- finished in 0.277s ----------
[19:31:24.362] ZotHero[Script Filter] {
  "items": [
    {
      "title": "Error in workflow 'ZotHero'",
      "subtitle": "'NoneType' object is not subscriptable",
      "valid": false,
      "icon": {
        "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
      }
    }
  ]

cocoaaa avatar Apr 28 '24 02:04 cocoaaa