alfred-safari-tabs-workflow
alfred-safari-tabs-workflow copied to clipboard
[ERROR: alfred.workflow.input.scriptfilter]
Typing "tabs" seem to trigger the workflow as the "Search for tabs" message appears. After a little while tho, Alfred falls back to web searches.
At this time, this error is logged to the debugger:
Starting debug for 'Safari Tabs'
[ERROR: alfred.workflow.input.scriptfilter] Code 1: Traceback (most recent call last):
File "<string>", line 3, in <module>
File "tabs.py", line 9, in show_tabs
wins_tabs = all_tabs()
File "tabs.py", line 74, in all_tabs
return json.loads(output)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
I just installed the Workflow, and had Safari already open with 11 open tabs. Versions:
- Alfred 2.3
- OS X 10.9.3
- Safari 7.0.4
- Python 2.7.5
Not sure if the problem will go away once I restart Safari/Alfred/the computer, but I thought you'd like the error report.
Update: after resetting my computer, I tried the workflow again. This time it took ~5 seconds, but the tabs were correctly loaded without errors. Weirdly enough, after successfully switching to a tab using the workflow, I got this:

I then granted access to accessibility features to Alfred, and the workflow has worked beautifully since.