Jump to content

[SOLVED] Notification can't receive {query}


Recommended Posts

I want to run a script and post a notification for the output of the scipt.

#!/bin/bash

a=`python3 /Users/Ninzero/Documents/PythonProgramme/rav/rav.py choose`
echo $a

it worked well on shell but notification didn't show anything

Link to post

Welcome, @Ninzero,

 

We can’t properly help you without access to your Workflow.


Debugging can already be hard with access to the code, and you’re asking us to guess yours from a description. There are multiple places where your code or Workflow setup may be going wrong. Without looking at it we’re shooting in the dark, which is a waste of time for everyone involved (including you).


Read the Reporting Problems with Workflows topic, as it gives a nice overview on how to build an effective report.

Link to post

Open the debugger, set the log output to “All Information”, and run your Workflow. You’ll likely see line 3: python3: command not found.


Alfred doesn’t know about your shell setup, just like your shell doesn’t, by default. You likely have some PATH line in your shell’s configuration files that tells it where to find python3. So Change that to /usr/local/bin/python3 or whatever its path is (check with which python3 in a Terminal) and it should work.

Link to post
2 minutes ago, Ninzero said:

is there a way to let Alfred know where is python3?

 

Only on a case-by-case basis. You can, for example, add your PATH line to the top of the script. Think of it as a blank shell every time.

Link to post
  • vitor changed the title to [SOLVED] Notification can't receive {query}

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...