Skip to content

Aiohttp failing to get response on awaited urls #3432

@ChakshuGautam

Description

@ChakshuGautam

Long story short

Aiohttp failing to get response on awaited urls

    allUrls = await getAllUrls(a, b, c);
    urls = ['url1', 'url3'];
    result = await fetchAll(session, tasks, urls);
    return json(result);

When using awaited allUrls I am getting the following error
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: '

When I hardcode the urls (by printing them previously) in the variable urls, it gives the expected output

Expected behaviour

It should be same in both cases. I am dynamically generating the urls and I might be missing something really basic.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions