question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Import fails after pip install: from flask_swagger_ui import get_swaggerui_blueprint

See original GitHub issue

I think the import needs to be removed from the flask_swagger_ui/__init__.py file - this works from context of example.py , but not after pip installation into site-packages

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rredkovichcommented, Feb 23, 2017

Have same issue with import on python3, hovewer successfully resolved after adding relative import in module __init__.py

from .flask_swagger_ui import get_swaggerui_blueprint
0reactions
sveintcommented, Mar 3, 2017

Thanks!

I should of course have used relative imports (even though I use python2 still, so I didn’t notice). I have committed the fix, will push to pypi shortly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Unable to import a module that is definitely installed
In my case, it is permission problem. The package was somehow installed with root rw permission only, other user just cannot rw to...
Read more >
flask-swagger-ui - PyPI
Simple Flask blueprint for adding Swagger UI to your flask application. Included Swagger UI version: 4.11.1. Installation. pip install flask-swagger-ui. Usage.
Read more >
Add Swagger UI to Python Flask API - YouTube
In this video I demonstrate adding Swagger UI to your Python 3 Flask API ... import flask-swagger-ui into you main app python file,...
Read more >
Flask Swagger UI not able to find swagger.json. Fetch error ...
json exists and is present in the directory. I am adding my code for views.py and where I have added Swagger specific code:...
Read more >
Your Python Flask API is Nothing Without Swagger UI.
from flask_swagger_ui import get_swaggerui_blueprint; Add a folder to the root of ... Add some Swagger specific blueprint code after you instantiate Flask ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found