Jump to content

Bladiko

Member
  • Posts

    5
  • Joined

  • Last visited

Posts posted by Bladiko

  1. 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,

    1. Does desktop Notion have to be open for this workflow to work? 
    2. 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. 

     

    SCR-20221001-duv.png

  2. 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; 

     

    SCR-20220930-ok3.png

  3. 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/"}]}

    SCR-20220930-cho.png

  4. 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

×
×
  • Create New...