jstacoder / flask-cms

a minimal CMS built on the pythonic MTV (model / template / view) pattern, implemented using the flask webframework
136 stars 37 forks source link

exception on running manage.py #16

Closed jvsteiner closed 8 years ago

jvsteiner commented 8 years ago

Hi, I was trying out the project, and I ran into a problem running manage.py for the first time:

python manage.py db upgrade yielded:

werkzeug.utils.ImportStringError: import_string() failed for 'flask_cms.core.urls'. Possible reasons are:

- missing __init__.py in a package;
- package or module path not included in sys.path;
- duplicated package or module name taking precedence in sys.path;
- missing module, class, function or variable;

Debugged import:

- 'flask_cms' found in '/Users/jamie/Code/flask-cms/venv/lib/python2.7/site-packages/flask_cms-0.0.1-py2.7.egg/flask_cms/__init__.pyc'.
- 'flask_cms.core' not found.

Original exception:

ImportError: No module named core.urls

update

I did some debugging as the error is just an import problem. seems like the numerous import statements starting with flask_cms.* aren't being found. Since this seemed like it could be a problem with the package name being there, I removed the flask_cms. from them all, which cured the import errors, and allowed the app to start, unfortunately, the result is that going to localhost:8088 (where the output of ./start.sh indicated the page should be found in my case) resulted in no useful output from the dev server to the browser. The interpreter did yield 127.0.0.1 - - [22/Jan/2016 21:15:42] "GET / HTTP/1.1" 200 - but nothing was visible in the browser.

update2

determined that the empty output is due to a blank file at flask_cms/core/templates/test_grid.html

jstacoder commented 8 years ago

The

jstacoder commented 8 years ago

The import errors are happening because you didn't install flask_cms

$ python setup.py install

I think test_grid was something I was planning to add a while ago, I'll remove it's reference.

jvsteiner commented 8 years ago

Hmm, strange, but I stashed the import line changes I made, reinstall flask_cms as above, and still get the import errors. I am using a virtualenv - could that have something to do with it?

jstacoder commented 8 years ago

sooo it seems the main issue is that it isnt coping the sub-packages when it installs flask-cms as an egg, so if you just use the repo instead, it will work

$ ./venv/bin/python setup.py develop

that should work. lemme know if it does for you

jstacoder commented 8 years ago

UPDATE: as long as i delete the flask-cms egg using the repo with the previous command gets things working