-
Notifications
You must be signed in to change notification settings - Fork 71
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
"Api object has no attribute _extract_schemas" #2
Comments
Hi, Glad you like it! I'll get this resolved asap.
the _extract_schemas method is inherited from flask_restful_swagger_2's Api class ( "flask-restful-swagger-2==0.33" ), eg.
Can you share the code you have so I can reproduce it please? |
Hi guys, I am experiencing this same issue and believe I found the problem. Pip installed flask_restful_swagger-2==0.35 which does not contain a _extract_schemas method within flask_restful_swagger_2.py:Api(restful_Api). If I force pip to install flask_restful_swagger-2==0.33 and inspect that object I see that it does contain the appropriate method. Regarding the new FRS version, it exists in _BaseExtractorImpl(Extractor) which is in the same module but definitely not in the class. I could not see where any extractor was wired in to the current object. I suppose the questions are 1) whether the FRS guys provided a migration path for this method and 2) whether your deployment script is being properly executed through tools such as pip, including evaluation of dependencies. Regarding the last, if I run |
Thanks for bringing this up! The fix turns out to be pretty simple, I can use the Extractor class from FRS :
then do
I committed the fix to github. I have to do some more testing and Thanks again Frank & Ian! |
safrs 1.0.3 |
Hi there!
Excited about this project, and I appreciate your work.
Attempting to run this on pre-existing sqlalchemy models, I get the following error:
This is running against objects that inherit from SAFRSBase.
The code is the same as the example, butwith my own models, and exposing them via
expose_object
.In addition, I have tried it with the exact test code, replaced sqlite with postgres, and get the same error.
The text was updated successfully, but these errors were encountered: