Bhishan Posted October 14, 2018 Posted October 14, 2018 (edited) I was trying to write a simple workflow to convert farenheit to celcius and display in alfred using script filter. Here is the workflow link. Code: import json import sys faren = float(sys.argv[1]) celcius = (faren - 32) * 5.0/9 data = {'valid': 'true', 'title': 'Farenheit to Celcius', 'subtitle': str(celcius) } data_lst = [data] data = {"items": data_lst} json.dump(data, sys.stdout) Problem: It gives following error IndexError: list index out of range How to fix the error? Thanks. Edited October 14, 2018 by Bhishan
deanishe Posted October 14, 2018 Posted October 14, 2018 Uncheck "Alfred filters results". If that's checked, Alfred doesn't pass the query to your script. Bhishan 1
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