PiKatso Posted September 26, 2017 Share Posted September 26, 2017 This is my error : [ERROR: input.scriptfilter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON: input the {"items":[]} "input the" is the result of code "echo $userInput This Alfred node, runs a script called search.rb. I've screen shotted it below as well. The script calls all redbooth API's(a project management app) Projects, Tasklists and tasks. It then runs a loop through each item and looks for titles that match the user input/ARGV. I have run the script locally in my terminal and the script returns the correct objects and should be printing them/returning to Alfred. However I get the above issue and I can't seem to figure out where my disconnect is. Additional info/screen shots below. search.rb/the script alfred runs to generate the script filter options. This code(below/list_proj.rb) calls the redbooth API and takes all returned objects/projects and converts the data to json. When the script rubs as is in a alfred script node- it populates the filter options. This code works to the desired effect. Posting for comparison This is a snap shot of the work flow. Everything works with the exception of the Search function/nodes Please let me know if I can provide anything else. I have a separate plugin that provides user auth for the work flow to access the redbooth client API. Any insights to this error or what I may have missed would be well appreciated. Thanks! Link to comment
GuiB Posted September 27, 2017 Share Posted September 27, 2017 The output of you script should only be a JSON string, but you have "echo input $userInput" that send "input $userInput" (-> "input the") to stdout and just before the JSON string (which I assume output a correct JSON string). So, you should remove or comment this first line so it is not sent to Alfred. Link to comment
Vero Posted September 27, 2017 Share Posted September 27, 2017 @PiKatso Welcome to the forum! Could you please fill in your Powerpack email address in your forum profile? Thanks, Vero Link to comment
Erik Posted October 5, 2017 Share Posted October 5, 2017 @PiKatso I'd love to use your Redbooth workflow, even if the search-function doesn't work! Will you be so kind to share this workflow? 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