Python Forum
how can I call the API using python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how can I call the API using python
#3
(May-14-2023, 11:26 PM)bowlofred Wrote: It's saying that the response it received couldn't be decoded as JSON. It could be a simple HTML message saying that the key isn't matching or similar.

Instead of invoking the .json() method on the response, take a look at the .content attribute. What does it say?

I got this error:
Traceback (most recent call last):
File "C:\Users\LENOVO\Documents\Custom\domaines\lab\already sold finish\ok.py", line 59, in <module>
appraisal_res = requests.get(appraisal.format(domain), headers=headers).content()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'bytes' object is not callable
[Finished in 13.1s]
Reply


Messages In This Thread
how can I call the API using python - by alifihri - May-14-2023, 10:09 PM
RE: how can I call the API using python - by alifihri - May-14-2023, 11:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Call pip3 from python folder build by me call pip3 from the /usr/bin Suryavarman 3 3,864 Oct-07-2019, 10:23 PM
Last Post: Suryavarman

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020