wrjlewis / notion-search-alfred-workflow

An Alfred workflow to search Notion with instant results
GNU General Public License v3.0
831 stars 42 forks source link

Notion Search fails after typing 'ns' in alfred #45

Closed ajubin closed 2 years ago

ajubin commented 2 years ago

Describe the bug The plugin was working really well, but since some days (I don't know precisely), when I type 'ns' to do my search, the plugin activate briefly then disapear and I can't search

Expected behaviour I expect to conitnue typing and see my search result.

Screenshots NA

Workflow (please complete the following information):

Additional context I've got the following logs

[10:07:44.070] Notion Search[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.382DF0A1-FB1C-46FA-8F66-6129049B2874%3E7DD3BDE5-A157-42E5-9376-F681FB50A4EE)] Queuing argument ''
[10:07:44.581] Notion Search[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.382DF0A1-FB1C-46FA-8F66-6129049B2874%3E7DD3BDE5-A157-42E5-9376-F681FB50A4EE)] Script with argv '(null)' finished
[10:07:44.590] ERROR: Notion Search[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.382DF0A1-FB1C-46FA-8F66-6129049B2874%3E7DD3BDE5-A157-42E5-9376-F681FB50A4EE)] Code 1: Traceback (most recent call last):
  File "notion.py", line 198, in <module>
    for x in searchResults.pages:
AttributeError: 'Payload' object has no attribute 'pages'
wrjlewis commented 2 years ago

Can you please check the workflow logs in Alfred? And post here

ajubin commented 2 years ago

the one I've posted in the Additional Context are not sufficient ? I'll try to update variables with fresher one and keep you updated

ajubin commented 2 years ago

Sorry for the inconvenience, by refreshing space-id and cookie value, everything worked perfectly.

I'll add a check on the Issue Template to make sure the person updated notion cookie and space id

wrjlewis commented 2 years ago

Thats great, thank you! I left a minor comment on your commit.

Please raise a PR when you're ready. @ajubin