Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does not work with alfred (notionscripts module not found)

See original GitHub issue

run python src/ and it seems to return the right outcome

python src/
  <BreadcrumbBlock (id='b178de11-cf1a-41d0-a0ce-bc2cc153a9db')>,
  <ColumnListBlock (id='5dd988e2-9ad2-40b7-a35b-e904e8d49c28')>,
  <Block (id='09896a10-59e6-44f1-9236-1cbdad6a26ba', type='copy_indicator')>,
  <Block (id='4f76989c-c894-45dc-b4e0-e9b5a2944ec1', type='copy_indicator')>,
  <Block (id='731c695a-eec6-45e2-8f54-f300b2c5a976', type='copy_indicator')>,
  <Block (id='cee982cd-6fa7-453c-9e09-9316e7ab57c1', type='copy_indicator')>,
  <CollectionViewBlock (id='66aec8a1-2042-40d3-a1b0-87ef29ee1c77', title='2019 > Week 8 >  Lights', collection=<Collection (id='25010c71-5809-4b56-96b0-4a91a8a63fe3')>)>,
  <CollectionViewBlock (id='70a97d2e-447e-4f89-ba4d-6017f45dc7d0', title='Wins', collection=<Collection (id='cfc3190b-767e-4bc5-9494-1abf29f4bded')>)>,
  <SubheaderBlock (id='e3acb8ab-c73e-4087-b1b5-1ee5b040b8ff', title='Weekly Review')>,
  <SubsubheaderBlock (id='4c330765-5cf5-43d7-a1b7-bff341879215', title='Lights (Aim for 5-6 *Yes,* adjust if outside of this)')>,
  <BulletedListBlock (id='eeaab19e-b237-4891-ba27-0655c8ff800c', title='_Reflection_on_objectives_what_changes_for_next_week_')>,
  <SubsubheaderBlock (id='66be0070-3d57-49dc-97f7-e75f47b750f6', title='ScreenTime ')>,
  <TextBlock (id='2344efc3-6d25-4bdd-a65d-698a6dfe11bf', title='_Screenshot_of_ScreenTime_')>,
  <TextBlock (id='6aff26de-0c5a-4132-91a6-58c81424e04b')>,
  <ColumnBlock (id='a9d0d7ff-f341-4c2a-b4a9-c6c93c042440')>,
  <ColumnBlock (id='45b5b795-cbea-4b12-9c2b-db5c60b0b511')>,
  <SubheaderBlock (id='1a00f0b6-778c-4372-9979-62c6d6c9a1f3', title='Days')>,
  <PageBlock (id='705d2631-7ddf-4865-823a-a1f056cbcd2a', title='February 16 (Sunday)')>,
  <PageBlock (id='0a907b46-b003-431e-8089-02e530e04fd2', title='February 17 (Monday)')>,
  <PageBlock (id='48db4933-3d98-4f81-b840-6a1a20378f92', title='February 18 (Tuesday)')>,
  <PageBlock (id='98be36a8-69d1-44aa-8aff-d0317eebb57b', title='February 19 (Wednesday)')>,
  <PageBlock (id='a39b3bb2-93a0-408e-b9bd-eba49be433fa', title='February 20 (Thursday)')>,
  <PageBlock (id='b14352f3-34e4-4a24-b535-b351f2e4016f', title='February 21 (Friday)')>,
  <PageBlock (id='3f52c760-baa9-4568-a118-1af81f6ecf5a', title='February 22 (Saturday)')>,

but when I run Open Current Day in Alfred it failed, here it is the debug info:

[16:45:36.975] Notion[Keyword] Processing complete
[16:45:36.975] Notion[Keyword] Passing output '' to Run Script
[16:45:37.062] ERROR: Notion[Run Script] Traceback (most recent call last):
  File "/Users/ywen8/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E529221C-0AAA-4528-AA8F-1D44DE9C2B2C/src/", line 5, in <module>
    from notion_api import notion_api
  File "/Users/ywen8/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.E529221C-0AAA-4528-AA8F-1D44DE9C2B2C/src/", line 1, in <module>
    from notionscripts.notion_api import NotionApi
ModuleNotFoundError: No module named 'notionscripts'
[16:45:37.069] Notion[Run Script] Processing complete
[16:45:37.069] Notion[Run Script] Passing output '' to Filter
[16:45:37.070] Notion[Run Script] Passing output '' to Call External Trigger
[16:45:37.070] Notion[External] Processing complete
[16:45:37.070] Notion[External] Passing output '' to Filter
[16:45:37.071] Notion[Filter] Processing complete
[16:45:37.071] Notion[Filter] Passing output '' to Post Notification

Kevin, I appreciate your help.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

sundevilyangcommented, Mar 8, 2020

Finally working now, Thanks for your help.

I changed the shebang into #!/Users/ywen8/.pyenv/versions/3.8.1/bin/python3 , because I am using pyenv.

kevinjalbertcommented, Mar 7, 2020

Firstly I symlink by ln -s, but alfred has no reaction to it. then I built a blank alfred workflow, dump alfred folder stuffs into it.

So the symlink should add the workflow into Alfred if I recall correctly.

ln -s ~/path/to/notion-toolbox/alfred ~/path/to/Alfred.alfredpreferences/workflows/notion-toolbox-alfred

Getting this symlink is important as the repo’s shared directory is used as well (pulled in through the dependencies).

I can’t run pip3 install -r requirements.txt in alfred workflow directory, it show ERROR: …/shared is not a valid editable requirement…

So when I see the above error, I feel that the symlink didn’t work out as the (shared directory install failed).

notion_scripts.egg-info directory is how the shared directory of code is packaged for the other directories/tools.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ModuleNotFoundError: No module named 'notionscripts' #8
I got the following error after run any command with alfred: ... if its just something in the Alfred environment that is causing...
Read more >
Alfred MODULE_NOT_FOUND not found error
Hi, I am importing node modules within my workflow (written in node.js) and the workflow was working fine. However, I noticed that I...
Read more >
Troubleshooting - Alfred Help and Support
Troubleshoot issues you have with Alfred's features with our quick instruction guides.
Read more >
Troubleshooting & Tips - AlfredCamera Help Center - Zendesk
Troubleshoot Account & Settings · Why can't I log in to my account? · Why can't I find the verification email? · How...
Read more >
Python - Module Not Found - Stack Overflow
My issue was that it was installed for python, but not for python3. To check to see if a module is installed for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found