Random error - JSON Parse error: Unexpected identifier "undefined" (-2700)
Opened this issue · 0 comments
Hi! Thanks for making this workflow!
I have one issue - when I enter my word(s) to be translated it sometimes gives 'error' in the Alfred output. I did some testing and couldn't find a pattern, since it sometimes gives error and sometimes not for the same exact word(s). This is from Alfred's debugger:
[08:26:08.974] ERROR: Deepl-Translate[Script Filter] Code 8: curl -s 'https://www2.deepl.com/jsonrpc' '--compressed -H authority: www2.deepl.com -H Origin: https://www.deepl.com -H Referer: https://www.deepl.com/translator -H Accept: / -H Content-Type: application/json -H Accept-Language: en-us -H User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Safari/605.1.15' --data-binary $'{"jsonrpc":"2.0","method": "LMT_handle_jobs","params":{"commonJobParams": {"browserType": 1, "mode": "translate", "textType": "plaintext"}, "jobs":[{"kind":"default","raw_en_sentence":"hi","preferred_num_beams":4,"raw_en_context_before":[],"raw_en_context_after":[],"quality":"fast"}],"lang":{"user_preferred_langs":["EN"],"source_lang_user_selected":"auto","target_lang":"en"},"priority":1,"timestamp":1557063997314},"id":79120002}'
execution error: Error: SyntaxError: JSON Parse error: Unexpected identifier "undefined" (-2700)