Acidham Posted November 11, 2018 Share Posted November 11, 2018 I am trying to switch from AS to python and started to migrate some of my workflows. In AS it was easy to get 'alfred_workflow_cache' dir by using shell command. But how can this be achieved with python? I found on danishe page to use os.getenv('alfred_workflow_cache') but it returns None (NoneType) . Link to comment
deanishe Posted November 11, 2018 Share Posted November 11, 2018 36 minutes ago, Acidham said: use os.getenv('alfred_workflow_cache') but it returns None (NoneType) Then you're doing something wrong. Please post the broken workflow, so we can see what it is. Link to comment
Acidham Posted November 11, 2018 Author Share Posted November 11, 2018 (edited) Is it possible because I am using External Script in Script Filter? I am need to run my script on Python3.7 therefore I thought external script will work better. Attached test wf without using External Script. The issue stays the same https://db.tt/QenwLHNNkc Edited November 11, 2018 by Acidham Link to comment
Tsunami Posted November 11, 2018 Share Posted November 11, 2018 (edited) https://www.alfredapp.com/help/workflows/script-environment-variables/ Quote alfred_workflow_cache and alfred_workflow_data ... Note that these two will only be populated if your workflow has a bundle id set. Your workflow does not have a bundle ID, so they're not populated. Edited November 11, 2018 by Tsunami Link to comment
Acidham Posted November 11, 2018 Author Share Posted November 11, 2018 Argh, stupid. Usually I am setting bundle id but forgot ? thx for the help! 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