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 mentioned this on Discord a couple of months ago, but have only just gotten back into hacking on the FSR code. This issue manifests as a TypeError in aiohttp when you hit ctrl-C to interrupt the script, like so:
yarn run v1.22.18
$ cd server && venv/bin/python server.py
/home/maybe/dev/fsr/fsr/webui/server/server.py:327: DeprecationWarning: There is no current event loop
main_thread_loop = asyncio.get_event_loop()
* WebUI can be found at: http://10.10.9.144:5000
Found Profiles: ['']
/home/maybe/dev/fsr/fsr/webui/server/server.py:208: DeprecationWarning: isSet() is deprecated, use is_set() instead
while not thread_stop_event.isSet():
/home/maybe/dev/fsr/fsr/webui/server/server.py:252: DeprecationWarning: isSet() is deprecated, use is_set() instead
while not thread_stop_event.isSet():
======== Running on http://0.0.0.0:5000 ========
(Press CTRL+C to quit)
Client connected
^CTraceback (most recent call last):
File "/home/maybe/dev/fsr/fsr/webui/server/server.py", line 460, in <module>
web.run_app(app, port=HTTP_PORT)
File "/home/maybe/dev/fsr/fsr/webui/server/venv/lib64/python3.10/site-packages/aiohttp/web.py", line 512, in run_app
_cancel_tasks({main_task}, loop)
File "/home/maybe/dev/fsr/fsr/webui/server/venv/lib64/python3.10/site-packages/aiohttp/web.py", line 444, in _cancel_tasks
asyncio.gather(*to_cancel, loop=loop, return_exceptions=True)
TypeError: gather() got an unexpected keyword argument 'loop'
Per aio-libs/aiohttp#5905, this just looks like the dependency in requirements.txt needs to be bumped. Installing the newer releases of aiohttp and async-timeout (>= 4.0 seems necessary) fixes the ^C issue, but causes something else to break silently so that sensor values don't get reported to the UI. The value bars and the time plot both sit at 0, even though I apply pressure to my test sensor.
No sure what the breakage with the value reporting is, if I work it out I'll follow up here or make another issue.
The text was updated successfully, but these errors were encountered:
Newer versions of python (e.g. 3.10) need upgraded aiohttp, otherwise
there are weird issues with Ctrl+C (see issue).
However, doing so also requires calling asyncio.get_event_loop() after
web.run_app() because now asyncio.get_event_loop() doesn't return a loop
if one isn't set. web.run_app() sets one.
Fixesteejusb#48
Newer versions of python (e.g. 3.10) need upgraded aiohttp, otherwise
there are weird issues with Ctrl+C (see issue).
However, doing so also requires calling asyncio.get_event_loop() after
web.run_app() because now asyncio.get_event_loop() doesn't return a loop
if one isn't set. web.run_app() sets one.
Fixes#48
I mentioned this on Discord a couple of months ago, but have only just gotten back into hacking on the FSR code. This issue manifests as a TypeError in
aiohttp
when you hit ctrl-C to interrupt the script, like so:Per aio-libs/aiohttp#5905, this just looks like the dependency in
requirements.txt
needs to be bumped. Installing the newer releases ofaiohttp
andasync-timeout
(>= 4.0 seems necessary) fixes the ^C issue, but causes something else to break silently so that sensor values don't get reported to the UI. The value bars and the time plot both sit at 0, even though I apply pressure to my test sensor.No sure what the breakage with the value reporting is, if I work it out I'll follow up here or make another issue.
The text was updated successfully, but these errors were encountered: