Load Python Script: Error loading Python script Problem

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/

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')


Did you check with indentation?

Also share the workflow folder, so that i can check


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

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

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