external-application-button
external-application-button copied to clipboard
Trying to run a Python script with URL as a parameter
I have a Python script that takes a URL as a parameter and does some processing. I can successfully execute it from a terminal by running:
/usr/bin/python3 /home/<user>/path/to/script.py https://example.com
I've set up the application like this:
I have installed the native-client
and I can successfully check the connection. However, upon clicking it, I receive the following error:
If you still get this page even when the "Check Button" reports successful connection, it means the application cannot be accessed (path is not correct in the options page). If the path to the executable is correct and the native client is connected, you can debug the connection by enabling console logs in Chrome and Opera or Firefox.
In my console logs, I see an unhandled exception:
stderr output from native app com.add0n.node: events.js:183
stderr output from native app com.add0n.node: throw er; // Unhandled 'error' event
stderr output from native app com.add0n.node: ^
stderr output from native app com.add0n.node:
stderr output from native app com.add0n.node: Error: write callback called multiple times
stderr output from native app com.add0n.node: at Transform.afterTransform (_stream_transform.js:81:22)
stderr output from native app com.add0n.node: at Transform.observe [as handler] (/home/<user>/.config/com.add0n.node/host.js:432:5)
stderr output from native app com.add0n.node: at Transform._transform (/home/<user>/.config/com.add0n.node/messaging.js:107:10)
stderr output from native app com.add0n.node: at Transform._read (_stream_transform.js:186:10)
stderr output from native app com.add0n.node: at Transform._write (_stream_transform.js:174:12)
stderr output from native app com.add0n.node: at doWrite (_stream_writable.js:397:12)
stderr output from native app com.add0n.node: at writeOrBuffer (_stream_writable.js:383:5)
stderr output from native app com.add0n.node: at Transform.Writable.write (_stream_writable.js:290:11)
stderr output from native app com.add0n.node: at Input.ondata (_stream_readable.js:639:20)
stderr output from native app com.add0n.node: at emitOne (events.js:116:13)
...which doesn't really help me to debug the application. What am I doing wrong?
try:
Executable Name: /usr/bin/python3
Arguments: /home/<user>/path/to/script.py https://example.com
stderr output from native app com.add0n.node: events.js:183
stderr output from native app com.add0n.node: throw er; // Unhandled 'error' event
stderr output from native app com.add0n.node: ^
stderr output from native app com.add0n.node:
stderr output from native app com.add0n.node: Error: write callback called multiple times
stderr output from native app com.add0n.node: at Transform.afterTransform (_stream_transform.js:81:22)
stderr output from native app com.add0n.node: at Transform.observe [as handler] (/home/