Skip to content
Advertisement

Tag: aiohttp

aiohttp has different response to http.client in Python request to API

Context: This works: This does not. It returns { ‘error’:’invalid_client’ }. Question: I cannot understand what the difference is between them. Any ideas what might be happening? I’ve also tried: Adding headers to the ClientSession(headers=headers) too. Using the URL and removing params Other notes: aiohttp docs here: https://docs.aiohttp.org/en/stable/client_reference.html aiohttp version: 3.7.4.post0 Answer in docs: for GET query for POST body

AIOHTTP replacing %3A with :

Hello, i’m having this issue where AIOHTTP is converting characters like %3A to the original :. i need to use the %3A version in the API req, if not, it raises 404 My code: URL it should’ve used: error raised (and url used): Answer First of all, are you sure this is what you want to do? I ask because

Python – getting lost around async

As the title said – I’m having a problem with async stuff. What I’m trying to achieve is written under every function. Sadly in this state of code I’m getting and error: TypeError: object StreamReader can’t be used in ‘await’ expression and at the end RuntimeError: Event loop is closed I was googling for a while and didn’t really find

Error whenever I run code that requires aiohttp library

Whenever I run code which requires aiohttp, I get the error below: Examples of codes I’ve tried to run from https://docs.aiohttp.org/en/stable/ include: and I’ve tried several other examples but they all produce the same error. What could be causing this?. I’m using python 3.8.6 and the latest version of aiohttp Update: It seems the error is caused by importing aiohttp.

Advertisement