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
I have issue with connection to DB on Windows on code, which work on Linux.
After some research it looks like issue related to Windows what use SelectorEventLoop and it should be replaced to ProactorEventLoop. (check this stackoverflow post)
Traceback for my issue:
Traceback (most recent call last):
File "run_test.py", line 43, in <module>
asyncio.run(Notifier(**data))
File "C:\Program Files\Python38\lib\asyncio\runners.py", line 43, in run
return loop.run_until_complete(main)
File "C:\Program Files\Python38\lib\asyncio\base_events.py", line 616, in run_until_complete
return future.result()
File "C:\Users\X4\git\massenders\app\core\notifier.py", line 316, in ppr
clientManager: ClientManager = await ManagersDi.clientDataManager()
File "C:\Users\X4\git\massenders\app\core\di.py", line 56, in get_ClientManager
return ClientManager(await DBDi.mdbPool())
File "C:\Users\X4\git\massenders\app\core\di.py", line 30, in get_mdb_connection
return await aiopg.create_pool(mdb_dns, minsize=5, maxsize=30)
File "C:\Program Files\Python38\lib\site-packages\aiopg\pool.py", line 155, in from_pool_fill
await self._fill_free_pool(False)
File "C:\Program Files\Python38\lib\site-packages\aiopg\pool.py", line 193, in _fill_free_pool
conn = await connect(
File "C:\Program Files\Python38\lib\site-packages\aiopg\connection.py", line 38, in connect
coro = Connection(
File "C:\Program Files\Python38\lib\site-packages\aiopg\connection.py", line 92, in __init__
self._loop.add_reader(self._fileno, self._ready, self._weakref)
File "C:\Program Files\Python38\lib\asyncio\events.py", line 501, in add_reader
raise NotImplementedError
NotImplementedError
Exception ignored in: <function Connection.__del__ at 0x0000020AF0118F70>
Traceback (most recent call last):
File "C:\Program Files\Python38\lib\site-packages\aiopg\connection.py", line 512, in __del__
File "C:\Program Files\Python38\lib\site-packages\aiopg\connection.py", line 310, in close
File "C:\Program Files\Python38\lib\site-packages\aiopg\connection.py", line 285, in _close
File "C:\Program Files\Python38\lib\asyncio\events.py", line 504, in remove_reader
NotImplementedError:
The problem with aiopg\connection.py in self._loop.add_reader(self._fileno, self._ready, self._weakref) which referred to asyncio\events.py where all class AbstractEventLoop have NotImplementedError:
and because there used direct methods (self._loop.add_reader) I can't make quick workaround to make code works. There need some implementation when Windows platform is used.
I have issue with connection to DB on Windows on code, which work on Linux.
After some research it looks like issue related to Windows what use SelectorEventLoop and it should be replaced to ProactorEventLoop. (check this stackoverflow post)
Traceback for my issue:
The problem with
aiopg\connection.py
inself._loop.add_reader(self._fileno, self._ready, self._weakref)
which referred toasyncio\events.py
where allclass AbstractEventLoop
haveNotImplementedError
:and because there used direct methods (
self._loop.add_reader
) I can't make quick workaround to make code works. There need some implementation when Windows platform is used.It is also referenced in documentation note:
Is it possible to add support of
asyncio.ProactorEventLoop()
?The text was updated successfully, but these errors were encountered: