Ninzero Posted May 19, 2018 Share Posted May 19, 2018 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 comment
vitor Posted May 19, 2018 Share Posted May 19, 2018 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 comment
Ninzero Posted May 19, 2018 Author Share Posted May 19, 2018 (edited) I am sorry for the inconvenience. https://www.dropbox.com/s/7gf23dssr6m8f4e/Rev.alfredworkflow?dl=0 Mac OS High Sierra 10.13.4 (17E202) Alfred V3.6.1 python 3.6 Edited May 19, 2018 by Ninzero Link to comment
vitor Posted May 19, 2018 Share Posted May 19, 2018 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 comment
Ninzero Posted May 19, 2018 Author Share Posted May 19, 2018 It solves my problem, thank you very much. At the same time, is there a way to let Alfred know where is python3? Thank you Link to comment
vitor Posted May 19, 2018 Share Posted May 19, 2018 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 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