In UiPath, when we write a code in Invoke VBA. We would be able to figure out where the error existed in the code. But while Integrating a Python script, we are unable to figure out where the error existed in the code. We have to go back to the IDLE and re-edit the code. It would be great if we get the compilation error at the Uipath level itself instead of a generic message similar to “Load Python Script Failed”
Unfortunately, Python code is not compiled. You will mostly only be able to find issues during runtime. UiPath could do some static analysis in order to find trivial errors, like ones regarding syntax, using something like Flake8, but it’s not a silver bullet.
As a side note, I would highly recommend developing Python code in a full IDE and not IDLE. PyCharm for instance has a lot of these tools already built-in, so you would not have to rely on UiPath, just configure your linters to your liking for your project.