wrjlewis / notion-search-alfred5-workflow

An Alfred5 workflow to search Notion with instant results
GNU General Public License v3.0
72 stars 3 forks source link

"title": "There was an error:", "subtitle": "299: 'Payload' object has no attribute 'results'" #9

Closed mvaneijgen closed 1 year ago

mvaneijgen commented 1 year ago

Describe the bug Search stopped working. Since the update search was a bit buggy where it wouldn't find keywords in the title where it wasn't in the start of the title, but now search stops all to getter. I do get the initial list (latest visteded?), but as soon as I search I get the following error "title": "There was an error:", "subtitle": "299: 'Payload' object has no attribute 'results'"

Do I need to refresh something? To get it to work again? I've double checked my SpaceID and Cookies and due to the initial load these seem fine

Log https://gist.github.com/mvaneijgen/cfc0f161532cb8dfd0f01e1c25b5a33e

Workflow (please complete the following information):

wrjlewis commented 1 year ago

Yeah this has been reported several times today, looks like there’s been a breaking change of some sort on notions side.

Im on holiday at the moment, so can’t debug it further until next weekend.

If anyone wants to figure it out in the meantime, I would start with printing the raw search response from notion and seeing where it doesn’t match with what the code is expecting / trying to parse

On Fri, 9 Jun 2023 at 04:51, Mitchel van Eijgen @.***> wrote:

Describe the bug Search stopped working. Since the update search was a bit buggy where it wouldn't find keywords in the title where it wasn't in the start of the title, but now search stops all to getter. I do get the initial list (latest visteded?), but as soon as I search I get the following error "title": "There was an error:", "subtitle": "299: 'Payload' object has no attribute 'results'"

Do I need to refresh something? To get it to work again? I've double checked my SpaceID and Cookies and due to the initial load these seem fine

Log https://gist.github.com/mvaneijgen/cfc0f161532cb8dfd0f01e1c25b5a33e

Workflow (please complete the following information):

  • Version [e.g. 0.5.3]
  • Alfred 5.1.1 [2138]
  • MacBook M2 pro macOS Ventura 13.2.1

— Reply to this email directly, view it on GitHub https://github.com/wrjlewis/notion-search-alfred5-workflow/issues/9, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALY3SSPPSWJXHNNKDAESQLXKLWYXANCNFSM6AAAAAAZANJTFM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

cristiananastasiu commented 1 year ago

In notion.py, change line 68 with query["sort"] = {"field":"relevance"}

wrjlewis commented 1 year ago

Thank you! I haven't had a chance to test the following suggestion and I'll update the workflow at the weekend. For anyone wanting to get the workflow working in the meantime they can search for their notion.py file, stored within Alfred's workflow directory, and make the following change:

In notion.py, change line 68 with query["sort"] = {"field":"relevance"}

mvaneijgen commented 1 year ago

Yeah this has been reported several times today

Oh, sorry! I thought I had check all other issues and I didn't see anything similar.

@cristiananastasiu great catch!

For anyone else wanting to do this and want some more guidance.

Open Alfred preferences > go to the Workflows tab > find the Notion Search > Right click show in finder > And open "notion.py"

You can search for query["sort"] = "Relevance or go to line 68 and replace the whole line with query["sort"] = {"field":"relevance"}, don't for get to save.

Will be patiently waiting for the update. Have a nice holiday @wrjlewis

wrjlewis commented 1 year ago

This has been fixed now in the latest release, thanks for all your help https://github.com/wrjlewis/notion-search-alfred5-workflow/releases/tag/v0.5.3-alfred5