giovannicoppola / alfred-readwise

An Alfred Workflow for your Readwise account
MIT License
14 stars 0 forks source link

Refresh Readwise database #3

Open bigornoo opened 7 months ago

bigornoo commented 7 months ago

Hello, I've a problem with Alfred 5.5 and your workflow :

[11:18:27.919] alfred-readwise[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.E2BF49CD-6DEB-48DC-8844-724F18009FEF%3E37AB99A4-161A-48DE-A1FC-3DEBF8A0AE79)] Queuing argument '(null)'
[11:18:28.109] alfred-readwise[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.E2BF49CD-6DEB-48DC-8844-724F18009FEF%3E37AB99A4-161A-48DE-A1FC-3DEBF8A0AE79)] Script with argv '(null)' finished
[11:18:28.114] ERROR: alfred-readwise[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.E2BF49CD-6DEB-48DC-8844-724F18009FEF%3E37AB99A4-161A-48DE-A1FC-3DEBF8A0AE79)] Code 1: 0 days from last update
Traceback (most recent call last):
  File "/Users/me/Library/CloudStorage/Dropbox/Applications/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E2BF49CD-6DEB-48DC-8844-724F18009FEF/readwise-query.py", line 218, in <module>
    main ()
  File "/Users/me/Library/CloudStorage/Dropbox/Applications/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E2BF49CD-6DEB-48DC-8844-724F18009FEF/readwise-query.py", line 213, in main
    queryItems (MY_DATABASE, MYINPUT)
  File "/Users/me/Library/CloudStorage/Dropbox/Applications/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E2BF49CD-6DEB-48DC-8844-724F18009FEF/readwise-query.py", line 53, in queryItems
    tag_rows = db.execute(tag_statement).fetchall()
               ^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: no such table: tags
[11:19:48.848] alfred-readwise[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.E2BF49CD-6DEB-48DC-8844-724F18009FEF%3E87446133-7FDD-4169-BD42-4A428AEC2F39)] Queuing argument '(null)'
[11:19:49.926] alfred-readwise[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.E2BF49CD-6DEB-48DC-8844-724F18009FEF%3E87446133-7FDD-4169-BD42-4A428AEC2F39)] Script with argv '(null)' finished
[11:19:49.928] ERROR: alfred-readwise[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.E2BF49CD-6DEB-48DC-8844-724F18009FEF%3E87446133-7FDD-4169-BD42-4A428AEC2F39)] Code 1: rebuilding database ⏳...
Making export api request with params {}...
/Users/me/Library/CloudStorage/Dropbox/Applications/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E2BF49CD-6DEB-48DC-8844-724F18009FEF/lib/urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host 'readwise.io'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
Traceback (most recent call last):
  File "/Users/me/Library/CloudStorage/Dropbox/Applications/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E2BF49CD-6DEB-48DC-8844-724F18009FEF/readwise-rebuild.py", line 13, in <module>
    makeLabelList()
  File "/Users/me/Library/CloudStorage/Dropbox/Applications/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E2BF49CD-6DEB-48DC-8844-724F18009FEF/readwise_fun.py", line 216, in makeLabelList
    myTags = json.loads (label[0].replace("'", '"'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
               ^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 79 (char 78)

I'm on macOS 13.6.3 Could you help me ? Thank you :)