victordong Posted July 30, 2022 Share Posted July 30, 2022 (edited) I made a simple workflow to parse a json text. It has only three steps, like this Everything is ok when the selected text is not that large. But when the selected text is about 16M (a big json text), the workflow does not work and post an error notice. At the beginning, i thought it was because of the script. But it will still throw the same error when i delete most of the logic of the script. Now the run script is below, query="{query}" The screenshots of the run script is the fourth picture above. Alfred version is: Alfred 5.0.1 Build 2067, Wednesday 27th July 2022 MacOS version is: I put the example json text on github, https://github.com/ernest-dzf/playground/blob/master/json.tar.gz Edited July 30, 2022 by victordong Link to comment
victordong Posted July 30, 2022 Author Share Posted July 30, 2022 example json text I put the example json text on github. Link to comment
vitor Posted July 30, 2022 Share Posted July 30, 2022 Welcome @victordong, Because you’re directly passing in the text, your argument becomes longer than what macOS can handle. TextEdit can’t even navigate the file on an M1 without hanging. The solution is to first save the text to a temporary file then read the file in the Run Script. victordong 1 Link to comment
victordong Posted July 31, 2022 Author Share Posted July 31, 2022 14 hours ago, vitor said: Welcome @victordong, Because you’re directly passing in the text, your argument becomes longer than what macOS can handle. TextEdit can’t even navigate the file on an M1 without hanging. The solution is to first save the text to a temporary file then read the file in the Run Script. Thanks! The solution works! 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