Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'asyncio.tasks' has no attribute '_gather' on Python 3.6 #386

Closed
rezib opened this issue Nov 12, 2024 · 3 comments
Closed
Assignees
Labels
bug This was supposed to work in this case and clearly it is not.
Milestone

Comments

@rezib
Copy link
Contributor

rezib commented Nov 12, 2024

The gateway has failed with the stack trace on Python 3.6:

[2024-11-12 08:53:44,890] ERROR in app: Exception on /api/agents/smcpoc/stats [GET]
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/usr/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/lib/python3.6/site-packages/rfl/web/tokens.py", line 56, in wrapped
    return view(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/slurmweb/views/gateway.py", line 37, in wrapped
    return view(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/slurmweb/views/gateway.py", line 236, in stats
    return proxy_agent(cluster, "stats", request.token)
  File "/usr/lib/python3.6/site-packages/slurmweb/views/gateway.py", line 230, in proxy_agent
    return asyncio_run(async_proxy_agent(*args, **kwargs))
  File "/usr/lib/python3.6/site-packages/slurmweb/asyncrun.py", line 68, in asyncio_run
    return asyncio_run_backport(main)
  File "/usr/lib/python3.6/site-packages/slurmweb/asyncrun.py", line 56, in asyncio_run_backport
    _cancel_all_tasks(loop)
  File "/usr/lib/python3.6/site-packages/slurmweb/asyncrun.py", line 26, in _cancel_all_tasks
    asyncio.tasks._gather(*to_cancel, loop=loop, return_exceptions=True)
AttributeError: module 'asyncio.tasks' has no attribute '_gather'

Originally posted by @bl7711 in #385

@rezib rezib added the bug This was supposed to work in this case and clearly it is not. label Nov 12, 2024
@rezib rezib added this to the v4.0.0 milestone Nov 12, 2024
@rezib rezib self-assigned this Nov 12, 2024
@rezib
Copy link
Contributor Author

rezib commented Nov 12, 2024

For the record, I successfully reproduced the issue here: https://github.com/rackslab/RFL/actions/runs/11795303337/job/32854742504?pr=22#step:8:123

@rezib
Copy link
Contributor Author

rezib commented Nov 12, 2024

This will be fixed in upcoming release of RFL v1.1.2. It will be used by Slurm-web v4.0.0, there is nothing more to do here.

@rezib rezib closed this as completed Nov 12, 2024
@bl7711
Copy link

bl7711 commented Nov 13, 2024

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This was supposed to work in this case and clearly it is not.
Projects
None yet
Development

No branches or pull requests

2 participants