Invoke Python method throwing error

I need to run a python code in my project to get some informations, When the code is executed in Visual Studio it runs perfectly, but in UiPath throws the error “Invoke Python Method: One or more errors occurred. (Error invoking Python method)”. Anyone can help me?

@guilherme.dias

Please run in debug mode and open the exception details from locals panel…you would get more info of what the error is

Few general checks

  1. You should have only one version of python installed
  2. Environment path variable is to be mapped
  3. And if working directory is different did you pass that?

Cheers