Coder Social home page Coder Social logo

Comments (7)

thehesiod avatar thehesiod commented on May 14, 2024

from what I see this is an issue with your usecase/tornado. aiobotcore and its dependencies require the use of an Event loop that's compatible with BaseEventLoop. The BaseEventLoop requires support of Tasks and a task requires a current_task and it doesn't seem like tornado sets/provides this. btw even passing timeout=None would cause the error because it does the current_task check before the None timeout check in that timeout class.

from aiobotocore.

thehesiod avatar thehesiod commented on May 14, 2024

btw, can you try with the latest aiohttp? The codepath has changed significantly in regard to timeouts

from aiobotocore.

andymo avatar andymo commented on May 14, 2024

Regarding Tornado's use of current_task, it was brought up in the two issues I linked previously, as well as most other issues opened regarding tornado + aio libraries. I figured since a fix did make its way into aiohttp, aiobotocore could support it. Otherwise I understand, it's not really aiobotocore's responsibility :)

I am on the latest pypi version of aiohttp (1.3.3), which should have all commits regarding timeouts that were pushed to fix aio-libs/aiohttp#1180, since I used this example and it was working. I see in the changelog of 1.3.4 that there is a revert of some timeout handling in client request, so I'll pull that and see if that helps, thanks!

from aiobotocore.

adamrothman avatar adamrothman commented on May 14, 2024

@andymo The simplest fix is to just wrap your calls in a Task, like so:

async def get(self):
    session = aiobotocore.get_session()
    client = session.create_client('s3')

    task = asyncio.ensure_future(client.list_buckets())
    response = await task

    self.write(response)

from aiobotocore.

thehesiod avatar thehesiod commented on May 14, 2024

btw, I'm disabling the use of aiohttp's read_timeout (#248) as it is implemented incorrectly, this may help your cause. If getting rid of conn timeout helps as well we can look into that. I'm really unhappy with their timeout impl :(

from aiobotocore.

jettify avatar jettify commented on May 14, 2024

@thehesiod do you think we can close this?

from aiobotocore.

thehesiod avatar thehesiod commented on May 14, 2024

I believe so

from aiobotocore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.