nd0 Posted September 19, 2022 Share Posted September 19, 2022 this has stopped working recently - I suspect this may have something to do with the introduction of Team Spaces on Notion? btw thanks for this amazing workflow Link to comment
wrjlewis Posted September 20, 2022 Author Share Posted September 20, 2022 15 hours ago, nd0 said: this has stopped working recently - I suspect this may have something to do with the introduction of Team Spaces on Notion? btw thanks for this amazing workflow Welcome! It seems to be working as far I can tell. Have you got the latest version? Link to comment
wrjlewis Posted September 20, 2022 Author Share Posted September 20, 2022 On 9/18/2022 at 5:33 PM, al1881 said: Great workflow - thank you @wrjlewis Works like a charm for me when opening Notion pages on the web. However, when I try to use the desktop app the same page is opened each time (although the search works perfectly). Anything I am missing? Many thanks. Welcome. Just to check, you've set the useDesktopClient variable to True, and it's only opening up one specific page each time? I've just tested on my desktop app and it's working as expected. It might be worth force quitting the notion app and starting it up again to see if that makes a difference. Link to comment
Tgriso Posted September 20, 2022 Share Posted September 20, 2022 Hello! Thanks for your workflow that I'm looking forward to use! I have however the same problem as nd0: 17 hours ago, nd0 said: this has stopped working recently - I suspect this may have something to do with the introduction of Team Spaces on Notion? btw thanks for this amazing workflow I followed the instructions, I have the latest version of the workflow but it doesn't search. However Notion opens in my browser when I click on Open Notion. Could it be that I don't have the right cookie or the right notionSpaceId? My cookie starts like this: “NEXT_LOCALE=fr-FR; notion_experiment...“. Is it normal? Link to comment
wrjlewis Posted September 20, 2022 Author Share Posted September 20, 2022 14 minutes ago, Tgriso said: Hello! Thanks for your workflow that I'm looking forward to use! I have however the same problem as nd0: I followed the instructions, I have the latest version of the workflow but it doesn't search. However Notion opens in my browser when I click on Open Notion. Could it be that I don't have the right cookie or the right notionSpaceId? My cookie starts like this: “NEXT_LOCALE=fr-FR; notion_experiment...“. Is it normal? Interesting. The cookie starts with the same text as mine, so it looks fine on that front, the important thing is that it contains the 'token_v2=' value. Some people are having issue with Python certificates, it might be worth checking this stack overflow answer just in case it fixes the issue. https://stackoverflow.com/questions/42098126/mac-osx-python-ssl-sslerror-ssl-certificate-verify-failed-certificate-verify Link to comment
nd0 Posted September 20, 2022 Share Posted September 20, 2022 6 hours ago, wrjlewis said: Welcome! It seems to be working as far I can tell. Have you got the latest version? Thanks for the quick reply, I do, just reinstalled just in case but getting the same issue. Does you notion space use teamspaces feature though? The feature is quite new and not everyone has started using it yet, so I just wanted to doublechek, as we have moved all of our stuff in notion into teamspaces recently. Link to comment
wrjlewis Posted September 20, 2022 Author Share Posted September 20, 2022 35 minutes ago, nd0 said: Thanks for the quick reply, I do, just reinstalled just in case but getting the same issue. Does you notion space use teamspaces feature though? The feature is quite new and not everyone has started using it yet, so I just wanted to doublechek, as we have moved all of our stuff in notion into teamspaces recently. Thanks for double checking, I don't use team spaces and I'm not a part of an enterprise organisation anymore so I can't test this out (personal or personal pro accounts don't have team spaces), unless someone is able to facilitate that for me or patch the workflow code. It could be that team spaces is causing the issue, but impossible to tell without the above. Link to comment
nd0 Posted September 22, 2022 Share Posted September 22, 2022 On 9/20/2022 at 4:42 PM, wrjlewis said: Thanks for double checking, I don't use team spaces and I'm not a part of an enterprise organisation anymore so I can't test this out (personal or personal pro accounts don't have team spaces), unless someone is able to facilitate that for me or patch the workflow code. It could be that team spaces is causing the issue, but impossible to tell without the above. Would be happy to facilitate in any way I can - not a developer, but other than that how can be of help? Link to comment
nd0 Posted September 29, 2022 Share Posted September 29, 2022 (edited) Strangely after reinstalling yet again I am now getting this error Edited September 29, 2022 by nd0 Link to comment
wrjlewis Posted September 29, 2022 Author Share Posted September 29, 2022 12 minutes ago, nd0 said: Strangely after reinstalling yet again I am now getting this error Thanks for sharing. I think your original issue, with team spaces, will persist after this error has been solved, unfortunately. Because I haven't been able to change anything relating to that. This error is because I introuduced this line in order to accommodate for Korean and other languages. alfredQuery = unicodedata.normalize('NFC',alfredQuery) Some googling suggests that character U+201C Left Double Quotation Mark is not present in the Latin-1 (ISO-8859-1) encoding, which presents this error. I don't know enough about unicode and latin-1 to fully understand this, so any help would be appreciated from someone who does. Link to comment
Bladiko Posted September 30, 2022 Share Posted September 30, 2022 I have Alfred 5 and the latest workflow. I ran the debugger and got the output below; [08:37:51.177] Logging Started... [08:38:00.126] Notion Search[Script Filter] Queuing argument '' [08:38:00.350] Notion Search[Script Filter] Script with argv '(null)' finished [08:38:00.353] Notion Search[Script Filter] {"items": [{"uid": 1, "type": "default", "title": "Open Notion - No results, empty query, or error", "subtitle": "", "arg": "notion://www.notion.so/"}]} [08:38:03.753] Notion Search[Script Filter] Queuing argument 'h' [08:38:07.687] Notion Search[Script Filter] Script with argv '(null)' finished [08:38:07.689] Notion Search[Script Filter] {"items": [{"uid": 1, "type": "default", "title": "Open Notion - No results, empty query, or error", "subtitle": "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)", "arg": "notion://www.notion.so/"}]} [08:38:10.923] Notion Search[Script Filter] Queuing argument 'ha' [08:38:11.145] Notion Search[Script Filter] Queuing argument 'hab' [08:38:11.353] Notion Search[Script Filter] Queuing argument 'haba' [08:38:12.222] Notion Search[Script Filter] Script with argv '(null)' finished Link to comment
Bladiko Posted September 30, 2022 Share Posted September 30, 2022 (edited) 17 minutes ago, Bladiko said: I have Alfred 5 and the latest workflow. I ran the debugger and got the output below; [08:37:51.177] Logging Started... [08:38:00.126] Notion Search[Script Filter] Queuing argument '' [08:38:00.350] Notion Search[Script Filter] Script with argv '(null)' finished [08:38:00.353] Notion Search[Script Filter] {"items": [{"uid": 1, "type": "default", "title": "Open Notion - No results, empty query, or error", "subtitle": "", "arg": "notion://www.notion.so/"}]} [08:38:03.753] Notion Search[Script Filter] Queuing argument 'h' [08:38:07.687] Notion Search[Script Filter] Script with argv '(null)' finished [08:38:07.689] Notion Search[Script Filter] {"items": [{"uid": 1, "type": "default", "title": "Open Notion - No results, empty query, or error", "subtitle": "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)", "arg": "notion://www.notion.so/"}]} [08:38:10.923] Notion Search[Script Filter] Queuing argument 'ha' [08:38:11.145] Notion Search[Script Filter] Queuing argument 'hab' [08:38:11.353] Notion Search[Script Filter] Queuing argument 'haba' [08:38:12.222] Notion Search[Script Filter] Script with argv '(null)' finished After refreshing the cookie and spaceID now i'm getting this error; position 512: ordinal not in range(256)", "arg": "notion://www.notion.so/"}]} [08:53:44.194] Notion Search[Script Filter] Queuing argument 'habakkuk' [08:53:44.344] Notion Search[Script Filter] Script with argv '(null)' finished [08:53:44.379] Notion Search[Script Filter] {"items": [{"uid": 1, "type": "default", "title": "Open Notion - No results, empty query, or error", "subtitle": "'latin-1' codec can't encode character '\\u2026' in position 512: ordinal not in range(256)", "arg": "notion://www.notion.so/"}]} Edited September 30, 2022 by Bladiko Link to comment
vitor Posted September 30, 2022 Share Posted September 30, 2022 Welcome @Bladiko, 4 hours ago, Bladiko said: SSL: CERTIFICATE_VERIFY_FAILED Looks like you installed Python manually. In that case you need to install the certificates too. For reference, we have short instructions on how to install languages via Homebrew. 7 hours ago, Bladiko said: After refreshing the cookie and spaceID now i'm getting this error; That is explained in the post right above yours, by the workflow’s author. @wrjlewis Text encodings has always been one Python’s sources of frustrations. There is somewhere in your code where text isn’t utf-8, but latin-1. Either it’s being converted to that, or misinterpreted, or retrieved as that. Anywhere where you’re doing byte string conversions is a good place to look. Try forcing text into utf-8, even where you think it already is, and you might find the issue. Additionally, in your Script Filter you’re using with input as {query}. Don’t. Use with input as argv. There’s a reason it’s the default and it saves you from having to do character escaping, which is incomplete in your case (it’s missing backquotes and dollars). The code then becomes python3 notion.py "${1}" Link to comment
Bladiko Posted September 30, 2022 Share Posted September 30, 2022 (edited) 38 minutes ago, vitor said: Welcome @Bladiko, Looks like you installed Python manually. In that case you need to install the certificates too. For reference, we have short instructions on how to install languages via Homebrew. That is explained in the post right above yours, by the workflow’s author. @wrjlewis Text encodings has always been one Python’s sources of frustrations. There is somewhere in your code where text isn’t utf-8, but latin-1. Either it’s being converted to that, or misinterpreted, or retrieved as that. Anywhere where you’re doing byte string conversions is a good place to look. Try forcing text into utf-8, even where you think it already is, and you might find the issue. Additionally, in your Script Filter you’re using with input as {query}. Don’t. Use with input as argv. There’s a reason it’s the default and it saves you from having to do character escaping, which is incomplete in your case (it’s missing backquotes and dollars). The code then becomes python3 notion.py "${1}" Thank you for the response, I hadn't seen @wrjlewis response. i've changed the code to what you suggested and now i'm getting the image below; Edited September 30, 2022 by Bladiko Link to comment
vitor Posted September 30, 2022 Share Posted September 30, 2022 12 minutes ago, Bladiko said: i've changed the code to what you suggested The suggestion is for @wrjlewis and the workflow as a whole, it’s not for your particular problem. Link to comment
wrjlewis Posted September 30, 2022 Author Share Posted September 30, 2022 (edited) 4 hours ago, vitor said: Welcome @Bladiko, Looks like you installed Python manually. In that case you need to install the certificates too. For reference, we have short instructions on how to install languages via Homebrew. That is explained in the post right above yours, by the workflow’s author. @wrjlewis Text encodings has always been one Python’s sources of frustrations. There is somewhere in your code where text isn’t utf-8, but latin-1. Either it’s being converted to that, or misinterpreted, or retrieved as that. Anywhere where you’re doing byte string conversions is a good place to look. Try forcing text into utf-8, even where you think it already is, and you might find the issue. Additionally, in your Script Filter you’re using with input as {query}. Don’t. Use with input as argv. There’s a reason it’s the default and it saves you from having to do character escaping, which is incomplete in your case (it’s missing backquotes and dollars). The code then becomes python3 notion.py "${1}" Thanks for the explanation, thats helpful. The problem I have now is that I'm unable to reproduce the error on my local machine. I've created a new page in notion, filled it with unicode characters such as “ and … which is referenced in the errors above, but I don't encounter an error when the results come back in the workflow. Edited September 30, 2022 by wrjlewis Link to comment
Bladiko Posted October 1, 2022 Share Posted October 1, 2022 (edited) 12 hours ago, wrjlewis said: Thanks for the explanation, thats helpful. The problem I have now is that I'm unable to reproduce the error on my local machine. I've created a new page in notion, filled it with unicode characters such as “ and … which is referenced in the errors above, but I don't encounter an error when the results come back in the workflow. So I managed to install the certificates, I refreshed the cookie and then I duplicated the script filter to include the parameter @vitor had suggested. So one has python3 notion.py "{query}" and the other python3 notion.py "${1}" In both instances i'm getting the error attached; I have a couple of questions, Does desktop Notion have to be open for this workflow to work? On macOS 12.6 which is the best browser to get the cookie coz i seem to be getting different values depending on which browser i use. Edited October 1, 2022 by Bladiko Link to comment
wrjlewis Posted October 1, 2022 Author Share Posted October 1, 2022 1 minute ago, Bladiko said: So I managed to install the certificates, I refreshed the cookie and then I duplicated the script filter to include the parameter @vitor had suggested. So one has python3 notion.py "{query}" and the other python3 notion.py "${1}" In both instances i'm getting the error attached; my other question is, does desktop Notion have to be open for this workflow to work? Hi Thanks for trying but @vitorsuggestion is intended for me to make in combination with the fix for the Unicode issue, so your workflow won’t work until I make a change to the workflow (on top of the advice given). You will get odd error codes until that’s done. Link to comment
Bladiko Posted October 1, 2022 Share Posted October 1, 2022 Thanks for the response. will be waiting for the update. Link to comment
秦子云 Posted October 10, 2022 Share Posted October 10, 2022 (edited) On 7/19/2022 at 5:30 PM, vitor said: Tried how? Don’t change the Workflow itself, it picks its own Python (3) version. But that error is not related to the language. If you installed Python 3 yourself (instead of letting macOS do it for you) you may need to install the certificates yourself too. That version is still up for review. If you’re having an issue, use the one officially out. This method is effective,it work , thank your help Edited October 10, 2022 by vitor Replaced quoted test with true comment (English, instead of translated) Link to comment
flymingo Posted November 3, 2022 Share Posted November 3, 2022 hi there,my cookies is“notion_check_cookie_consent=false; token_v2=0d........” is not "notion browser cookies",can you help me please , what should I do Link to comment
Alex Kokol Posted November 3, 2022 Share Posted November 3, 2022 Hello, since the new MacOS Update Venture v13. the search function doesn't work anymore. Can anyone help me? Link to comment
wrjlewis Posted November 3, 2022 Author Share Posted November 3, 2022 5 hours ago, flymingo said: hi there,my cookies is“notion_check_cookie_consent=false; token_v2=0d........” is not "notion browser cookies",can you help me please , what should I do Can you copy everything after Cookie: in your screenshot, and use that as your cookie value to paste into the workflow environment variable Link to comment
wrjlewis Posted November 3, 2022 Author Share Posted November 3, 2022 1 hour ago, Alex Kokol said: Hello, since the new MacOS Update Venture v13. the search function doesn't work anymore. Can anyone help me? I presume Venture is still in public beta? So it's not supported yet. Out of interest, what is the error you are getting, can you screenshot what happens when you try to search? Link to comment
vitor Posted November 3, 2022 Share Posted November 3, 2022 2 hours ago, Alex Kokol said: Hello, since the new MacOS Update Venture v13. the search function doesn't work anymore. Can anyone help me? Not without information. Open the debugger, set the log output to “All Information”, perform the failing action, and post the output. 1 hour ago, wrjlewis said: I presume Venture is still in public beta? It’s been out of beta since October 24th. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now