# Usar run python script

**URL:** <https://forum.uipath.com/t/usar-run-python-script/418692>\
**Category:** Ask in Your Language\
**Tags:** question\
**Created:** [April 27, 2022, 5:14pm UTC](https://forum.uipath.com/t/usar-run-python-script/418692 "2022-04-27T17:14:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![camilo\_gonzalez](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/camilo_gonzalez/32/194641_2.png) [@camilo\_gonzalez](https://forum.uipath.com/u/camilo_gonzalez)\
**Post date:** [April 27, 2022, 5:14pm UTC](https://forum.uipath.com/t/usar-run-python-script/418692/1 "2022-04-27T17:14:04Z")

</div>

Hola comunidad.

Estoy tratando de ejecutar un archivo .py con la actividad run python script, pero no me lo permite me indica One or more errores ocurred. Corrí el código desde spyder y funciona; pero con la actividad de UiPath no.

Quisiera Saber

- ¿no es posible correr un archivo .py?

- ¿Solo funciona si tengo métodos en el archivo.py?

\*¿Es obligatorio usar la actividad invoke Python Method aún cuando no tengo métodos que correr en el código?

el proceso que realizo primero es cargar el archivo y después lo corro, para ello uso las actividades load Python Script y Run Python Script.

![image](https://global.discourse-cdn.com/uipath/original/4X/9/4/c/94cb42abf439892621883dd5257ab4c5cc24ee02.png)

el scope funciona bien, es la actividad run la que presenta la alerta

Gracias por su ayuda

---

<div class="post-metadata">

**Author:** ![Rahul\_Unnikrishnan](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rahul_unnikrishnan/32/464046_2.png) [@Rahul\_Unnikrishnan](https://forum.uipath.com/u/Rahul_Unnikrishnan)\
**Post date:** [April 27, 2022, 5:37pm UTC](https://forum.uipath.com/t/usar-run-python-script/418692/2 "2022-04-27T17:37:18Z")

</div>

Hello,

Plz check whether the below video will help.

[![](https://global.discourse-cdn.com/uipath/original/4X/8/f/2/8f2754f248ccc164ad10ae5632ddb6727b5aa89f.jpeg "How to Execute Python Scripts in UiPath?| UiPath Python Activities| Python Scope| Load Python Script") ](https://www.youtube.com/watch?v=ysyH37iF-8Q)

---

<div class="post-metadata">

**Author:** ![camilo\_gonzalez](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/camilo_gonzalez/32/194641_2.png) [@camilo\_gonzalez](https://forum.uipath.com/u/camilo_gonzalez)\
**Post date:** [April 27, 2022, 7:02pm UTC](https://forum.uipath.com/t/usar-run-python-script/418692/3 "2022-04-27T19:02:11Z")

</div>

@Rahul_Unnikrishnan, gracias por la información; pero aún sigo con las dudas. Ya que según eso no podría ejecutar un archivo .py sin tener métodos creados. Sí o sí debo tener métodos en mi código.

---

<div class="post-metadata">

**Author:** ![liu\_shubin](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/liu_shubin/32/176938_2.png) [@liu\_shubin](https://forum.uipath.com/u/liu_shubin)\
**Post date:** [April 28, 2022, 1:43am UTC](https://forum.uipath.com/t/usar-run-python-script/418692/4 "2022-04-28T01:43:13Z")

</div>

You can refer to the following thread on how to run Python script in UiPath.

> [@How to run Python Script?](https://forum.uipath.com/t/how-to-run-python-script/190903/3):
>
> Please go through the following link :

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [May 6, 2022, 10:21pm UTC](https://forum.uipath.com/t/usar-run-python-script/418692/5 "2022-05-06T22:21:06Z")

</div>

Closed on May 6, 2022, 10:21pm UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
