Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. NotImplementedError: QAsyncioEventLoop.getaddrinfo() is not implemented yet
Forum Updated to NodeBB v4.3 + New Features

NotImplementedError: QAsyncioEventLoop.getaddrinfo() is not implemented yet

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 284 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    batton
    wrote on last edited by
    #1

    I was pointed to the QtAsyncio module to allow me to integrate asynchronous calls into my PyQt app.
    I have a langgraph app that was working stand-alone, but when I port the code into an async method of my PyQt app, I get the error mentioned in the title.

    The offending code is this:

    messages = await app.ainvoke(inputs)
    
    ainvoke()
    

    Is a standard langchain asynchronous function, and it worked when I ran the code in its own program before porting it to my PyQt app.

    Can anybody please shed some light on this?

    1 Reply Last reply
    1
    • R Offline
      R Offline
      roman_f
      wrote last edited by
      #2

      Yes, I also encountered that. Sadly, that's exactly what it means: PySide's asyncio event loop does not implement getaddrinfo: https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/pyside6/PySide6/QtAsyncio/events.py#n552

      In fact, none or almost none of the IO-related methods are implemented. Documentation also says that directly at https://doc.qt.io/qtforpython-6/PySide6/QtAsyncio/index.html:

      We consider that this API consists of two levels:

      1. Fundamental infrastructure for event loops and asynchronous operations, including futures, tasks, handles, executors, and event loop management functions (see below).
      2. A user-facing API for use in applications, including transports and protocols, network connections, servers, sockets, signals, subprocesses.

      QtAsyncio currently covers the first level.:

      One solution is to use trio in guest mode, like in this example: https://doc.qt.io/qtforpython-6/examples/example_async_minimal.html. Except it will not help you, because LangChain does not support trio. There are a few libraries that implement a similar capability for asyncio, but none of them seem particularly mature.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved