You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason, running your example runs into a NotImplementedError of asyncio when it tries to create a connection pool. The PostgreSQL psycopg2 package works just fine when I use it directly without aiopg.
To Reproduce
As already said, the code is just the first example of the README with the dsn modified to connect to my database.
Traceback (most recent call last):
File "C:\Users\mtroester\source\repos\kfz_webapi_migration\aiopg_test.py", line 22, in <module>
loop.run_until_complete(go())
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 654, in run_until_completereturn future.result()
^^^^^^^^^^^^^^^
File "C:\Users\mtroester\source\repos\kfz_webapi_migration\aiopg_test.py", line 12, in goasyncwith aiopg.create_pool(dsn) as pool:
File "C:\Users\mtroester\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\aiopg\utils.py", line 82, in __aenter__ self._obj =awaitself._coro
^^^^^^^^^^^^^^^^
File "C:\Users\mtroester\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\aiopg\pool.py", line 300, in from_pool_fillawaitself._fill_free_pool(False)
File "C:\Users\mtroester\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\aiopg\pool.py", line 336, in _fill_free_pool
conn =await connect(
^^^^^^^^
File "C:\Users\mtroester\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\aiopg\connection.py", line 65, in connect
connection = Connection(
^^^^^^^^^^^
File "C:\Users\mtroester\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\aiopg\connection.py", line 772, in __init__self._loop.add_reader(
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\events.py", line 534, in add_readerraiseNotImplementedError
NotImplementedError
Exception ignored in: <function Connection.__del__ at 0x0000015325BEA0C0>
Traceback (most recent call last):
File "C:\Users\mtroester\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\aiopg\connection.py", line 1188, in __del__
File "C:\Users\mtroester\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\aiopg\connection.py", line 995, in close
File "C:\Users\mtroester\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\aiopg\connection.py", line 977, in _close
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\events.py", line 537, in remove_readerNotImplementedError:
Python Version
$ python --versionPython 3.11.9(it's the official Python 3.11 version installed by the Windows 11 App Store)
aiopg Version
$ python -m pip show aiopgName: aiopgVersion: 1.4.0Summary: Postgres integration with asyncio.Home-page: https://aiopg.readthedocs.ioAuthor: Andrew SvetlovAuthor-email: [email protected]License: BSDLocation: C:\Users\mtroester\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packagesRequires: async-timeout, psycopg2-binaryRequired-by:
OS
Windows 11 Pro
Version 23H2
Additional context
I'm not sure whether I'm using the correct package versions together. When your base example doesn't work anymore, that's a huge deal IMO.
Code of Conduct
I agree to follow the aio-libs Code of Conduct
The text was updated successfully, but these errors were encountered:
Describe the bug
For some reason, running your example runs into a NotImplementedError of asyncio when it tries to create a connection pool. The PostgreSQL psycopg2 package works just fine when I use it directly without aiopg.
To Reproduce
As already said, the code is just the first example of the README with the dsn modified to connect to my database.
Running the example with psycopg2 works just fine.
I've tried both Python 3.11 and 3.12, but still same error. I even downgraded to Python 3.11 as I've seen you don't support 3.12 yet.
python -m pip list
for my 3.11 environment yieldsExpected behavior
Same result as in the example. Assertion passes.
Logs/tracebacks
Python Version
aiopg Version
OS
Windows 11 Pro
Version 23H2
Additional context
I'm not sure whether I'm using the correct package versions together. When your base example doesn't work anymore, that's a huge deal IMO.
Code of Conduct
The text was updated successfully, but these errors were encountered: