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 add the token_identify_permission behind ,when i start server it pop error
Traceback (most recent call last):
File "rest_api.py", line 94, in <module>
add_route(app,get_nodes_avg_percent)
File "/usr/local/lib/python3.6/site-packages/sanic_transmute/route.py", line 15, in add_route
get_swagger_spec(app_or_blueprint).add_func(transmute_func, context)
File "/usr/local/lib/python3.6/site-packages/transmute_core/swagger/__init__.py", line 55, in add_func
swagger_path = transmute_func.get_swagger_path(transmute_context)
File "/usr/local/lib/python3.6/site-packages/transmute_core/function/transmute_function.py", line 78, in get_swagger_path
operation = self.get_swagger_operation(context)
File "/usr/local/lib/python3.6/site-packages/transmute_core/function/transmute_function.py", line 94, in get_swagger_operation
parameters = get_swagger_parameters(self.parameters, context)
File "/usr/local/lib/python3.6/site-packages/transmute_core/http_parameters/swagger.py", line 15, in get_swagger_parameters
"required": arginfo.default is NoDefault,
AttributeError: 'NoneType' object has no attribute 'default'
arginfo should be a Argument(name='is_worker', default=True, type=<class 'bool'> , but it set None , and i remove args query_parameters=['is_worker'] or remove custom decorator ,it work fine
I just use sanic-transmute==0.1.3
The text was updated successfully, but these errors were encountered:
Hi! This is probably happening because the decorator extracts attributes from your decorated function, rather than the raw one that lies below.
What does your decorator looks like? It messes with the argument detection if your outer function, for example, does something like *arg, **kwarg which has no real signature.
If you use something like functools.wraps, maybe we could add a patch that will look at deeper functions for obviously annotated function wrappers.
example
I add the
token_identify_permission
behind ,when i start server it pop errorI check
arginfo should be a
Argument(name='is_worker', default=True, type=<class 'bool'>
, but it set None , and i remove argsquery_parameters=['is_worker']
or remove custom decorator ,it work fineI just use
sanic-transmute==0.1.3
The text was updated successfully, but these errors were encountered: