Quantcast
Channel: UiPath Community Forum - Topics tagged error
Viewing all articles
Browse latest Browse all 4384

Python Activity Troubleshooting

$
0
0

Step-A: (Validate the Configuration parameters)

  1. Check the Python exe file path location is properly specified in Python Scope properties
  2. Check the installed Python version is 64-bit or 32-bit. In case of 32-bit version select x86
  3. Specify the Python version installed. It is always better to specify the Python version rather selecting Auto.

Step-B:

  1. Instead of using " Run Python Script " activity, use Load Python Script -> Invoke Python Method -> Get Python Object .
  2. Remove the Print statements in Python Code

Step-C:

  1. If there is any error related to dependency/Package not found, please check if for the specified python instance (Configured in Python Scope) that package is installed. You can check the package is already installed by executing the command "pip install " . If it is already installed, it should prompt as “Requirement already satisfied” as below.
  2. If you have any python distribution installed in system like Anaconda, it installs packages in its directory only. Check python file you are trying to run from UiPath can be run from the command prompt for the specified installation. If any dependency is missing. install the dependency first.

Step-D:
In most of the cases executing python code from UiPath doesn’t give the proper error,
As Python is an interprited language, every statement is executed separately. Use following code snippet to identify which line is causing the issue:

outF = open ( "myOutFile.txt" , "w" )

outF.write("Test line1 added")

outF.close()

Step-E: (Work around)
If using Python activity, you are still getting error though the file can be run successfully from Command Prompt or Python IDLE. Run the python file from Powershell as below:

5 posts - 5 participants

Read full topic


Viewing all articles
Browse latest Browse all 4384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>