0
import requests

api_url = 'https://reqres.in/api/users?page=2'

response1 = requests.get(api_url)

print(response1.text)

result:

response1 = requests.kwargs(api_url)
AttributeError: partially initialized module 'requests' has no attribute 'kwargs' (most likely due to a circular import)
Karl Knechtel
  • 62,466
  • 11
  • 102
  • 153
Aga
  • 9
  • 1
  • The error message that you show does not match the code that you show. – Karl Knechtel Nov 24 '20 at 13:11
  • 1
    Two things: 1) The code you posted is calling `get`, but the error refers to `kwargs`. A [MCVE] needs to actually be reproducible and not omit/typo important things. 2) Did you happen to name your script, or a module in the same folder, `requests.py` by any chance? Normal `requests` shouldn't have a circular import involved. – ShadowRanger Nov 24 '20 at 13:12
  • 1
    its not a duplicate.... – adir abargil Nov 24 '20 at 13:13
  • there is no similar name – Aga Nov 24 '20 at 19:04
  • what i write after requests.get or anything result is same circular import problem – Aga Nov 24 '20 at 19:05

0 Answers0