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
[2017-05-17 16:08:43,303] ERROR in app: Exception on /apispec_1.json [GET]
Traceback (most recent call last):
File "/Users/dkharlan/venvs/myenv/lib/python3.6/site-packages/flasgger/utils.py", line 294, in load_from_file
with open(swag_path) as yaml_file:
FileNotFoundError: [Errno 2] No such file or directory: 'models/raw_text.yml'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/dkharlan/venvs/myenv/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/Users/dkharlan/venvs/myenv/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/dkharlan/venvs/myenv/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Users/dkharlan/venvs/myenv/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/Users/dkharlan/venvs/myenv/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/dkharlan/venvs/myenv/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/Users/dkharlan/venvs/myenv/lib/python3.6/site-packages/flask/views.py", line 84, in view
return self.dispatch_request(*args, **kwargs)
File "/Users/dkharlan/venvs/myenv/lib/python3.6/site-packages/flask/views.py", line 149, in dispatch_request
return meth(*args, **kwargs)
File "/Users/dkharlan/venvs/myenv/lib/python3.6/site-packages/flasgger/base.py", line 229, in get
endpoint=rule.endpoint, verb=verb
File "/Users/dkharlan/venvs/myenv/lib/python3.6/site-packages/flasgger/utils.py", line 338, in parse_docstring
full_doc = parse_imports(full_doc, root_path)
File "/Users/dkharlan/venvs/myenv/lib/python3.6/site-packages/flasgger/utils.py", line 420, in parse_imports
imported_doc = load_from_file(filepath, root_path=root_path)
File "/Users/dkharlan/venvs/myenv/lib/python3.6/site-packages/flasgger/utils.py", line 301, in load_from_file
with open(swag_path) as yaml_file:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/dkharlan/venvs/myenv/lib/python3.6/site-packages/flasgger/models/raw_text.yml'
The culprit appears to be https://github.com/rochacbruno/flasgger/blob/master/flasgger/utils.py#L362 where obj.__globals__['__file__'] resolves to '/Users/dkharlan/venvs/myenv/lib/python3.6/site-packages/flasgger/utils.py'. I'm not really sure why this would happen (maybe the way the endpoint function is imported influences the value of __file__? I'm unclear on Python's semantics here).
Thank you -- please let me know if you need more details.
The text was updated successfully, but these errors were encountered:
Given
thing_doer.yml
:with a file structure as follows:
I get the following exception:
The culprit appears to be https://github.com/rochacbruno/flasgger/blob/master/flasgger/utils.py#L362 where
obj.__globals__['__file__']
resolves to'/Users/dkharlan/venvs/myenv/lib/python3.6/site-packages/flasgger/utils.py'
. I'm not really sure why this would happen (maybe the way the endpoint function is imported influences the value of__file__
? I'm unclear on Python's semantics here).Thank you -- please let me know if you need more details.
The text was updated successfully, but these errors were encountered: