Jump to content

jepense

Member
  • Content Count

    2
  • Joined

  • Last visited

  1. Right, of course, I should've figured that out from the script in conv. Thanks! The problem with running the script from within Alfred was due to /usr/bin/python pointing to python 2.5 while in Terminal python pointed to 2.7 from python.org. I changed the default version and now it works as it should. Thanks!
  2. I'm trying to learn your python workflow library and decided to try convert as a tutorial. However, if I write "conv x" in Alfred, it always goes to the fallback search (Google etc.). If I try to run the python script convert.py in Terminal, I get python convert.py 200m/s mph 09:41:50 convert.py:100 DEBUG query : 200m/s 09:41:50 background.py:215 DEBUG Calling [u'/usr/bin/python', '/Users/myusername/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.417268A9-C3A4-4777-B247-D481035658FF/workflow/background.pyc', u'update'] ... RuntimeError: Bad magic number in .pyc file 09:41:50 background.py:218 ERROR Failed to call task in background 09:41:50 convert.py:57 DEBUG quantity : 200.0 tail : m/s 09:41:50 convert.py:135 CRITICAL Invalid query : No destination unit specified <?xml version="1.0" encoding="utf-8"?> <items><item valid="no"><title>No destination unit specified</title><subtitle>For example: 2.5cm in | 178lb kg | 200m/s mph</subtitle><icon>/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertCautionIcon.icns</icon></item></items>09:41:50 convert.py:153 DEBUG finished So something happens in background.py and then it doesn't parse the second units correctly. (But I'm actually more interested in understanding why Alfred doesn't tell an error occured but fell back to Google instead, since that happens also when I try to write something using the workflow library myself.)
×
×
  • Create New...