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

Cannot use @route() decorator more than once #13

Closed
TheClockTwister opened this issue Apr 14, 2021 · 1 comment · May be fixed by #14
Closed

Cannot use @route() decorator more than once #13

TheClockTwister opened this issue Apr 14, 2021 · 1 comment · May be fixed by #14
Labels
bug Something isn't working
Milestone

Comments

@TheClockTwister
Copy link
Owner

@app.route("/")
@app.route("/<path:path>")
async def home():

raises

Traceback (most recent call last):
  File "N:/Git/GitHub/Aeros/aeros/Request.py", line 88, in <module>
    async def home():
  File "N:\Git\GitHub\Aeros\aeros\WebServer.py", line 277, in new_route_decorator
    self.logger.critical(f'Endpoint function "{func.__name__}" for "{rule}" could not be routed: ' + str(e))
AttributeError: 'NoneType' object has no attribute '__name__'
@TheClockTwister TheClockTwister added the bug Something isn't working label Apr 14, 2021
@TheClockTwister TheClockTwister added this to the Version 2.0 milestone Apr 14, 2021
@TheClockTwister TheClockTwister linked a pull request Aug 5, 2021 that will close this issue
@TheClockTwister
Copy link
Owner Author

Quart keeps track of endpoint functions via some ind of memory addres or hash. Since we were decorating each function again with the EasyRequest or sync_to_async, this caused trouble. Since these are gone now (b3fd68d), we are good again...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant