Automator not working
LinusKaiser opened this issue · 2 comments
It seems that when using the automator installations that come with the pubmex the pubmex.py can not be found.
for f in "$@"
do
pubmex.py $f
done
The following error is displayed:
The action “Run Shell Script” encountered an error: “zsh:3: command not found: pubmex.py”
When specifying the direct location of just the pubmex.py file another error occures.
for f in "$@"
do
/users/suntim/miniforge3/bin/pubmex.py $f
done
The following error is displayed:
The action “Run Shell Script” encountered an error: “”
When specifying the direct location of python and the pubmex.py file another error occures.
for f in "$@"
do
/usr/local/bin/python3 /users/suntim/miniforge3/bin/pubmex.py $f
done
The following error is displayed:
The action “Run Shell Script” encountered an error: “Traceback (most recent call last): File "/users/suntim/miniforge3/bin/pubmex.py", line 27, in <module> from Bio import Entrez ModuleNotFoundError: No module named 'Bio'”
I have all dependencies installed pip3 install pubmex
, pip3 install biopython
, brew install poppler
. As it says in the readme.md that biopython should be isntalled via brew I assume that was a mistake. I instead installed it via pip3.
The same error messages occure regardless of using the zsh or bash version.
I came up with a solution to this problem. The environment variables of the automator zsh are not the same of the main system. by changing the path to the system paths it works. For me:
PATH=/Users/suntim/miniforge3/bin:/Users/suntim/miniforge3/condabin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
With that it works
dear @LinusKaiser or add source ~/.zshrc at the beginning of the Workflow, this should also help to find pubmex.py
I updated the Workflows now in this repo as well.