sanic-org / sanic-openapi

Easily document your Sanic API with a UI

Home Page:https://sanic-openapi.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]when using in anaconda,find such error:AttributeError: 'Route' object has no attribute 'handler'

liuyuzhou opened this issue · comments

commented

[ERROR] Experienced exception while trying to serve
Traceback (most recent call last):
File "E:\tools\anaconda\lib\site-packages\sanic\app.py", line 918, in run
serve_single(server_settings)
File "E:\tools\anaconda\lib\site-packages\sanic\server.py", line 725, in serve_single
serve(**server_settings)
File "E:\tools\anaconda\lib\site-packages\sanic\server.py", line 562, in serve
trigger_events(after_start, loop)
File "E:\tools\anaconda\lib\site-packages\sanic\server.py", line 352, in trigger_events
result = event(loop)
File "E:\tools\anaconda\lib\site-packages\sanic_openapi\swagger.py", line 81, in build_spec
if hasattr(route.handler, "view_class"):
AttributeError: 'Route' object has no attribute 'handler'
Traceback (most recent call last):
File "F:/workspace/transport_capacity/server_enter.py", line 26, in
app.run(host=app_ip_addr, port=app_port, debug=True)
File "E:\tools\anaconda\lib\site-packages\sanic\app.py", line 918, in run
serve_single(server_settings)
File "E:\tools\anaconda\lib\site-packages\sanic\server.py", line 725, in serve_single
serve(**server_settings)
File "E:\tools\anaconda\lib\site-packages\sanic\server.py", line 562, in serve
trigger_events(after_start, loop)
File "E:\tools\anaconda\lib\site-packages\sanic\server.py", line 352, in trigger_events
result = event(loop)
File "E:\tools\anaconda\lib\site-packages\sanic_openapi\swagger.py", line 81, in build_spec
if hasattr(route.handler, "view_class"):
AttributeError: 'Route' object has no attribute 'handler'

commented

I use the newest code, the question still.
I checkout the newest code.
If use pip install,the version it the same as before.

commented

dupe of #221

So,is the newest code merge to the master branch.

No it is not in master branch, try checking out s21 branch of artcg/sanic-openapi

commented

it seems I can't see this branch,when will you merge this code to master?