Skip to content
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

Cannot import for python 3 #18

Open
dridk opened this issue Aug 31, 2015 · 5 comments
Open

Cannot import for python 3 #18

dridk opened this issue Aug 31, 2015 · 5 comments

Comments

@dridk
Copy link

dridk commented Aug 31, 2015

I installed Flask-Autodoc (0.1.1) like all my packages using : pip install flask-autodoc and python3

When I tried to import Flask-Autodoc , I get this following error :

   In [4]: from flask.ext.autodoc import Autodoc
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-4-b490edb37e00> in <module>()
----> 1 from flask.ext.autodoc import Autodoc

/Users/sacha/dev/wingo-server/venv/lib/python3.4/site-packages/flask/exthook.py in load_module(self, fullname)
     79                 # is the one from __import__ above which we don't care about
     80                 if self.is_important_traceback(realname, tb):
---> 81                     reraise(exc_type, exc_value, tb.tb_next)
     82                 continue
     83             module = sys.modules[fullname] = sys.modules[realname]

/Users/sacha/dev/wingo-server/venv/lib/python3.4/site-packages/flask/_compat.py in reraise(tp, value, tb)
     30     def reraise(tp, value, tb=None):
     31         if value.__traceback__ is not tb:
---> 32             raise value.with_traceback(tb)
     33         raise value
     34 

/Users/sacha/dev/wingo-server/venv/lib/python3.4/site-packages/flask_autodoc/__init__.py in <module>()
      1 __author__ = 'arnaud'
----> 2 from autodoc import Autodoc

ImportError: No module named 'autodoc'
@theodickson
Copy link

Same exact issue here, also using 3.4

@lukeyeager
Copy link
Collaborator

Works for me. Here's what I did:

virtualenv -p python3 venv
source venv/bin/activate
pip install Flask-Autodoc
python -c "from flask.ext.autodoc import Autodoc"

Here's how to check whether you installed a python2 package instead of a python3 package:

$ pip --version
pip 1.5.4 from /.../venv/lib/python3.4/site-packages (python 3.4)

$ pip list | grep -i flask
Flask (0.10.1)
Flask-Autodoc (0.1.2)

@protoforge
Copy link

Just to chime in - This seems broken in Python 3.4 for me as well.

Anyone have a fix?

This seems like a great tool - any way of getting it repaired and added to the 'approved' flask registry? http://flask.pocoo.org/extensions/

@sallyruthstruik
Copy link

I faced with this problem too.

This pull request should fix this problem: #25
Or you can manually replace line
--- from flask_autodoc.autodoc import Autodoc +++ from .autodoc import Autodoc

in flask_autodoc.init.py

@pintman
Copy link

pintman commented Jul 15, 2021

Same problem here. Further: no update on this issue for years. :(

pintman pushed a commit to tbs1-bo/software-101 that referenced this issue Jul 15, 2021
old issue that hasn't been updated for 5 years
acoomans/flask-autodoc#18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants