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

[Bug]TypeError: listener() got an unexpected keyword argument 'priority' #239

Open
LufeiYang300 opened this issue Feb 15, 2024 · 1 comment

Comments

@LufeiYang300
Copy link

The version sanic-ext-23.12.0 [Bug]
Extend(app)

File "/usr/local/lib/python3.9/site-packages/sanic_ext/bootstrap.py", line 112, in init
extension._startup(self)
File "/usr/local/lib/python3.9/site-packages/sanic_ext/extensions/base.py", line 45, in _startup
self.startup(bootstrap)
File "/usr/local/lib/python3.9/site-packages/sanic_ext/extensions/injection/extension.py", line 12, in startup
add_injection(self.app, self.registry, self.constant_registry)
File "/usr/local/lib/python3.9/site-packages/sanic_ext/extensions/injection/injector.py", line 21, in add_injection
signature_registry = _setup_signature_registry(
File "/usr/local/lib/python3.9/site-packages/sanic_ext/extensions/injection/injector.py", line 77, in _setup_signature_registry
@app.listener("before_server_start", priority=PRIORITY - 1)
TypeError: listener() got an unexpected keyword argument 'priority'

@lidpwnz
Copy link

lidpwnz commented Apr 1, 2024

Hi! I think you need to update sanic into 23.12 instead of sanic-ext
ref: https://sanic.dev/en/guide/basics/listeners.html#priority

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants