# Load Python Script: Error loading Python script Problem

**URL:** <https://forum.uipath.com/t/load-python-script-error-loading-python-script-problem/236424>\
**Category:** Help\
**Tags:** question, python, activities\
**Created:** [July 7, 2020, 4:24pm UTC](https://forum.uipath.com/t/load-python-script-error-loading-python-script-problem/236424 "2020-07-07T16:24:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juan\_Esteban\_Valencia](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/juan_esteban_valencia/32/145001_2.png) [@Juan\_Esteban\_Valencia](https://forum.uipath.com/u/Juan_Esteban_Valencia)\
**Post date:** [July 7, 2020, 4:24pm UTC](https://forum.uipath.com/t/load-python-script-error-loading-python-script-problem/236424/1 "2020-07-07T16:24:04Z")

</div>

Hello friends, I have a problem with an automation where used python, the dbe code make a graphq query and return the result, under the python IDE the code works without problem, but in uipath it presents a problem.

This is the code.  
def add():  
import requests  
url = “[http://swapi.apis.guru/](http://swapi.apis.guru/)”

```
payload = "{\"query\":\"{\\r\\n person(personID: 4) {\\r\\n name\\r\\n birthYear\\r\\n }\\r\\n}\\r\\n\",\"variables\":{}}"
headers = {
  'Content-Type': 'application/json'
}

respuesta = requests.request("GET", url, headers=headers, data = payload)
return respuesta.text.encode('utf8')

```

 ![image](https://global.discourse-cdn.com/uipath/original/3X/3/a/3a68b935b5bae4f9a236da1a08db5e586c1a54e0.png)

---

<div class="post-metadata">

**Author:** ![Srini84](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/srini84/32/464032_2.png) [@Srini84](https://forum.uipath.com/u/Srini84)\
**Post date:** [July 7, 2020, 4:38pm UTC](https://forum.uipath.com/t/load-python-script-error-loading-python-script-problem/236424/2 "2020-07-07T16:38:12Z")

</div>

@Juan_Esteban_Valencia

Did you check with indentation?

Also share the workflow folder, so that i can check

Thanks

---

<div class="post-metadata">

**Author:** ![Juan\_Esteban\_Valencia](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/juan_esteban_valencia/32/145001_2.png) [@Juan\_Esteban\_Valencia](https://forum.uipath.com/u/Juan_Esteban_Valencia)\
**Post date:** [July 7, 2020, 5:14pm UTC](https://forum.uipath.com/t/load-python-script-error-loading-python-script-problem/236424/3 "2020-07-07T17:14:13Z")

</div>

Yes, as I mentioned the same code I run it in Spyder and it runs without problem

 ![image](https://global.discourse-cdn.com/uipath/original/3X/f/7/f7ab04a23f7c27b81445eb9cfdd186fcf4d8d386.png)

---

<div class="post-metadata">

**Author:** ![Juan\_Esteban\_Valencia](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/juan_esteban_valencia/32/145001_2.png) [@Juan\_Esteban\_Valencia](https://forum.uipath.com/u/Juan_Esteban_Valencia)\
**Post date:** [July 7, 2020, 8:04pm UTC](https://forum.uipath.com/t/load-python-script-error-loading-python-script-problem/236424/4 "2020-07-07T20:04:19Z")

</div>

I already detected that it is something to do with the library requests, it is as if I could not read that part of the code and therefore the error, I would greatly appreciate it if you could help me with this

---

<div class="post-metadata">

**Author:** ![edang](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/edang/32/180560_2.png) [@edang](https://forum.uipath.com/u/edang)\
**Post date:** [October 28, 2020, 10:31pm UTC](https://forum.uipath.com/t/load-python-script-error-loading-python-script-problem/236424/5 "2020-10-28T22:31:33Z")

</div>

> [@Srini84](#):
>
> @Juan_Esteban_Valencia

HI i have a similar problem presently, were you able to resolve your issue?

> [@Load Python Script: One or more errors occurred](https://forum.uipath.com/t/load-python-script-one-or-more-errors-occurred/264497):
>
> Hi, I’m a new user for UIPath, In “Main.xaml” here in my attachment, I’m trying to load a python script, and I have this error “Load Python Script: One or more errors occurred.” How can I overcome this? Seek help please [text-summarizer.zip](https://forum.uipath.com/uploads/short-url/b7jgsCaZPZCa4aIUrpR0XbfUvSg.zip) (3.8 KB)
