Python Flask Blueprints “project.routes.loginScreen import login_blueprint ImportError: No module named...
up vote
0
down vote
favorite
thank you in advance, I am a python novice--I'm working on a school group project, and they insist on using Blueprints with Flask. We're all working on Macs. I'm doing a clean clone of the repo, and getting this error when trying to run "python app.py" :
from project.routes.loginScreen import login_blueprint
ImportError: No module named routes.loginScreen
However, they can run the same code. I am so stumped, since there must be an environmental difference on my machine--I don't think the import headers matter since again, they can run this with no additional steps.
I already set 'export PYTHONDONTWRITEBYTECODE="true"' in my bash profile, and "git status' returns "working tree clean."
This is our file structure with modular routes:
├── __pycache__
│ └── app.cpython-37.pyc
├── app.py
├── create_tables.sql
└── project
├── __init__.py
├── __pycache__
│ └── __init__.cpython-37.pyc
├── routes
│ ├── __pycache__
│ │ ├── __init__.cpython-37.pyc
│ │ ├── addCorkboard.cpython-37.pyc
│ │ ├── addPushPin.cpython-37.pyc
│ │ ├── followUser.cpython-37.pyc
│ │ ├── likePushPin.cpython-37.pyc
│ │ ├── loginScreen.cpython-37.pyc
│ │ ├── postComment.cpython-37.pyc
│ │ ├── searchPushPin.cpython-37.pyc
│ │ ├── viewCorkboard.cpython-37.pyc
│ │ ├── viewHomescreen.cpython-37.pyc
│ │ ├── viewPopularSites.cpython-37.pyc
│ │ ├── viewPopularTags.cpython-37.pyc
│ │ ├── viewPushPin.cpython-37.pyc
│ │ ├── viewStatistics.cpython-37.pyc
│ │ └── watchCorkboard.cpython-37.pyc
│ ├── addCorkboard.py
│ ├── addPushPin.py
│ ├── followUser.py
│ ├── likePushPin.py
│ ├── loginScreen.py
│ ├── loginScreen.pyc
│ ├── postComment.py
│ ├── searchPushPin.py
│ ├── viewCorkboard.py
│ ├── viewCorkboard.pyc
│ ├── viewHomescreen.py
│ ├── viewPopularSites.py
│ ├── viewPopularTags.py
│ ├── viewPushPin.py
│ ├── viewStatistics.py
│ └── watchCorkboard.py
└── templates
├── _messages.html
├── addCorkboard.html
├── addPushPin.html
├── followUser.html
├── layout.html
├── likePushPin.html
├── loginScreen.html
├── postComment.html
├── searchPushPin.html
├── userLoginError.html
├── viewCorkboard.html
├── viewHomeScreen.html
├── viewPopularSites.html
├── viewPopularTags.html
├── viewPushPin.html
├── viewStatistics.html
└── watchCorkboard.html
Environment info:
Python 2.7.15
pip 10.0.1
pip list all
Package Version
---------------------------------- -------
appnope 0.1.0
asn1crypto 0.24.0
backports.shutil-get-terminal-size 1.0.0
blueprint 3.4.2
cffi 1.11.5
Click 7.0
cryptography 2.3.1
decorator 4.3.0
enum34 1.1.6
Flask 1.0.2
flask-blueprint 1.2.6
Flask-Login 0.4.1
Flask-MySQL 1.4.0
Flask-MySQLdb 0.2.0
Flask-WTF 0.14.2
idna 2.7
ipaddress 1.0.22
ipython 5.8.0
ipython-genutils 0.2.0
ItsDangerous 1.0.0
Jinja2 2.10
MarkupSafe 1.0
MySQL-python 1.2.5
mysqlclient 1.3.13
pathlib2 2.3.2
pbr 5.1.0
pexpect 4.6.0
pickleshare 0.7.5
pip 10.0.1
prompt-toolkit 1.0.15
ptyprocess 0.6.0
pycparser 2.19
Pygments 2.2.0
PyMySQL 0.9.2
scandir 1.9.0
setuptools 40.5.0
simplegeneric 0.8.1
six 1.11.0
stevedore 1.30.0
traitlets 4.3.2
virtualenv 16.0.0
virtualenv-clone 0.4.0
virtualenvwrapper 4.8.2
wcwidth 0.1.7
Werkzeug 0.14.1
wheel 0.31.1
WTForms 2.2.1
Thank you in advance!
python flask blueprint
add a comment |
up vote
0
down vote
favorite
thank you in advance, I am a python novice--I'm working on a school group project, and they insist on using Blueprints with Flask. We're all working on Macs. I'm doing a clean clone of the repo, and getting this error when trying to run "python app.py" :
from project.routes.loginScreen import login_blueprint
ImportError: No module named routes.loginScreen
However, they can run the same code. I am so stumped, since there must be an environmental difference on my machine--I don't think the import headers matter since again, they can run this with no additional steps.
I already set 'export PYTHONDONTWRITEBYTECODE="true"' in my bash profile, and "git status' returns "working tree clean."
This is our file structure with modular routes:
├── __pycache__
│ └── app.cpython-37.pyc
├── app.py
├── create_tables.sql
└── project
├── __init__.py
├── __pycache__
│ └── __init__.cpython-37.pyc
├── routes
│ ├── __pycache__
│ │ ├── __init__.cpython-37.pyc
│ │ ├── addCorkboard.cpython-37.pyc
│ │ ├── addPushPin.cpython-37.pyc
│ │ ├── followUser.cpython-37.pyc
│ │ ├── likePushPin.cpython-37.pyc
│ │ ├── loginScreen.cpython-37.pyc
│ │ ├── postComment.cpython-37.pyc
│ │ ├── searchPushPin.cpython-37.pyc
│ │ ├── viewCorkboard.cpython-37.pyc
│ │ ├── viewHomescreen.cpython-37.pyc
│ │ ├── viewPopularSites.cpython-37.pyc
│ │ ├── viewPopularTags.cpython-37.pyc
│ │ ├── viewPushPin.cpython-37.pyc
│ │ ├── viewStatistics.cpython-37.pyc
│ │ └── watchCorkboard.cpython-37.pyc
│ ├── addCorkboard.py
│ ├── addPushPin.py
│ ├── followUser.py
│ ├── likePushPin.py
│ ├── loginScreen.py
│ ├── loginScreen.pyc
│ ├── postComment.py
│ ├── searchPushPin.py
│ ├── viewCorkboard.py
│ ├── viewCorkboard.pyc
│ ├── viewHomescreen.py
│ ├── viewPopularSites.py
│ ├── viewPopularTags.py
│ ├── viewPushPin.py
│ ├── viewStatistics.py
│ └── watchCorkboard.py
└── templates
├── _messages.html
├── addCorkboard.html
├── addPushPin.html
├── followUser.html
├── layout.html
├── likePushPin.html
├── loginScreen.html
├── postComment.html
├── searchPushPin.html
├── userLoginError.html
├── viewCorkboard.html
├── viewHomeScreen.html
├── viewPopularSites.html
├── viewPopularTags.html
├── viewPushPin.html
├── viewStatistics.html
└── watchCorkboard.html
Environment info:
Python 2.7.15
pip 10.0.1
pip list all
Package Version
---------------------------------- -------
appnope 0.1.0
asn1crypto 0.24.0
backports.shutil-get-terminal-size 1.0.0
blueprint 3.4.2
cffi 1.11.5
Click 7.0
cryptography 2.3.1
decorator 4.3.0
enum34 1.1.6
Flask 1.0.2
flask-blueprint 1.2.6
Flask-Login 0.4.1
Flask-MySQL 1.4.0
Flask-MySQLdb 0.2.0
Flask-WTF 0.14.2
idna 2.7
ipaddress 1.0.22
ipython 5.8.0
ipython-genutils 0.2.0
ItsDangerous 1.0.0
Jinja2 2.10
MarkupSafe 1.0
MySQL-python 1.2.5
mysqlclient 1.3.13
pathlib2 2.3.2
pbr 5.1.0
pexpect 4.6.0
pickleshare 0.7.5
pip 10.0.1
prompt-toolkit 1.0.15
ptyprocess 0.6.0
pycparser 2.19
Pygments 2.2.0
PyMySQL 0.9.2
scandir 1.9.0
setuptools 40.5.0
simplegeneric 0.8.1
six 1.11.0
stevedore 1.30.0
traitlets 4.3.2
virtualenv 16.0.0
virtualenv-clone 0.4.0
virtualenvwrapper 4.8.2
wcwidth 0.1.7
Werkzeug 0.14.1
wheel 0.31.1
WTForms 2.2.1
Thank you in advance!
python flask blueprint
shouldn't there be an empty "init.py" file (add the underscores!) in the routes subdirectory? Also see docs.python.org/2/tutorial/modules.html
– gittert
Nov 21 at 9:21
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
thank you in advance, I am a python novice--I'm working on a school group project, and they insist on using Blueprints with Flask. We're all working on Macs. I'm doing a clean clone of the repo, and getting this error when trying to run "python app.py" :
from project.routes.loginScreen import login_blueprint
ImportError: No module named routes.loginScreen
However, they can run the same code. I am so stumped, since there must be an environmental difference on my machine--I don't think the import headers matter since again, they can run this with no additional steps.
I already set 'export PYTHONDONTWRITEBYTECODE="true"' in my bash profile, and "git status' returns "working tree clean."
This is our file structure with modular routes:
├── __pycache__
│ └── app.cpython-37.pyc
├── app.py
├── create_tables.sql
└── project
├── __init__.py
├── __pycache__
│ └── __init__.cpython-37.pyc
├── routes
│ ├── __pycache__
│ │ ├── __init__.cpython-37.pyc
│ │ ├── addCorkboard.cpython-37.pyc
│ │ ├── addPushPin.cpython-37.pyc
│ │ ├── followUser.cpython-37.pyc
│ │ ├── likePushPin.cpython-37.pyc
│ │ ├── loginScreen.cpython-37.pyc
│ │ ├── postComment.cpython-37.pyc
│ │ ├── searchPushPin.cpython-37.pyc
│ │ ├── viewCorkboard.cpython-37.pyc
│ │ ├── viewHomescreen.cpython-37.pyc
│ │ ├── viewPopularSites.cpython-37.pyc
│ │ ├── viewPopularTags.cpython-37.pyc
│ │ ├── viewPushPin.cpython-37.pyc
│ │ ├── viewStatistics.cpython-37.pyc
│ │ └── watchCorkboard.cpython-37.pyc
│ ├── addCorkboard.py
│ ├── addPushPin.py
│ ├── followUser.py
│ ├── likePushPin.py
│ ├── loginScreen.py
│ ├── loginScreen.pyc
│ ├── postComment.py
│ ├── searchPushPin.py
│ ├── viewCorkboard.py
│ ├── viewCorkboard.pyc
│ ├── viewHomescreen.py
│ ├── viewPopularSites.py
│ ├── viewPopularTags.py
│ ├── viewPushPin.py
│ ├── viewStatistics.py
│ └── watchCorkboard.py
└── templates
├── _messages.html
├── addCorkboard.html
├── addPushPin.html
├── followUser.html
├── layout.html
├── likePushPin.html
├── loginScreen.html
├── postComment.html
├── searchPushPin.html
├── userLoginError.html
├── viewCorkboard.html
├── viewHomeScreen.html
├── viewPopularSites.html
├── viewPopularTags.html
├── viewPushPin.html
├── viewStatistics.html
└── watchCorkboard.html
Environment info:
Python 2.7.15
pip 10.0.1
pip list all
Package Version
---------------------------------- -------
appnope 0.1.0
asn1crypto 0.24.0
backports.shutil-get-terminal-size 1.0.0
blueprint 3.4.2
cffi 1.11.5
Click 7.0
cryptography 2.3.1
decorator 4.3.0
enum34 1.1.6
Flask 1.0.2
flask-blueprint 1.2.6
Flask-Login 0.4.1
Flask-MySQL 1.4.0
Flask-MySQLdb 0.2.0
Flask-WTF 0.14.2
idna 2.7
ipaddress 1.0.22
ipython 5.8.0
ipython-genutils 0.2.0
ItsDangerous 1.0.0
Jinja2 2.10
MarkupSafe 1.0
MySQL-python 1.2.5
mysqlclient 1.3.13
pathlib2 2.3.2
pbr 5.1.0
pexpect 4.6.0
pickleshare 0.7.5
pip 10.0.1
prompt-toolkit 1.0.15
ptyprocess 0.6.0
pycparser 2.19
Pygments 2.2.0
PyMySQL 0.9.2
scandir 1.9.0
setuptools 40.5.0
simplegeneric 0.8.1
six 1.11.0
stevedore 1.30.0
traitlets 4.3.2
virtualenv 16.0.0
virtualenv-clone 0.4.0
virtualenvwrapper 4.8.2
wcwidth 0.1.7
Werkzeug 0.14.1
wheel 0.31.1
WTForms 2.2.1
Thank you in advance!
python flask blueprint
thank you in advance, I am a python novice--I'm working on a school group project, and they insist on using Blueprints with Flask. We're all working on Macs. I'm doing a clean clone of the repo, and getting this error when trying to run "python app.py" :
from project.routes.loginScreen import login_blueprint
ImportError: No module named routes.loginScreen
However, they can run the same code. I am so stumped, since there must be an environmental difference on my machine--I don't think the import headers matter since again, they can run this with no additional steps.
I already set 'export PYTHONDONTWRITEBYTECODE="true"' in my bash profile, and "git status' returns "working tree clean."
This is our file structure with modular routes:
├── __pycache__
│ └── app.cpython-37.pyc
├── app.py
├── create_tables.sql
└── project
├── __init__.py
├── __pycache__
│ └── __init__.cpython-37.pyc
├── routes
│ ├── __pycache__
│ │ ├── __init__.cpython-37.pyc
│ │ ├── addCorkboard.cpython-37.pyc
│ │ ├── addPushPin.cpython-37.pyc
│ │ ├── followUser.cpython-37.pyc
│ │ ├── likePushPin.cpython-37.pyc
│ │ ├── loginScreen.cpython-37.pyc
│ │ ├── postComment.cpython-37.pyc
│ │ ├── searchPushPin.cpython-37.pyc
│ │ ├── viewCorkboard.cpython-37.pyc
│ │ ├── viewHomescreen.cpython-37.pyc
│ │ ├── viewPopularSites.cpython-37.pyc
│ │ ├── viewPopularTags.cpython-37.pyc
│ │ ├── viewPushPin.cpython-37.pyc
│ │ ├── viewStatistics.cpython-37.pyc
│ │ └── watchCorkboard.cpython-37.pyc
│ ├── addCorkboard.py
│ ├── addPushPin.py
│ ├── followUser.py
│ ├── likePushPin.py
│ ├── loginScreen.py
│ ├── loginScreen.pyc
│ ├── postComment.py
│ ├── searchPushPin.py
│ ├── viewCorkboard.py
│ ├── viewCorkboard.pyc
│ ├── viewHomescreen.py
│ ├── viewPopularSites.py
│ ├── viewPopularTags.py
│ ├── viewPushPin.py
│ ├── viewStatistics.py
│ └── watchCorkboard.py
└── templates
├── _messages.html
├── addCorkboard.html
├── addPushPin.html
├── followUser.html
├── layout.html
├── likePushPin.html
├── loginScreen.html
├── postComment.html
├── searchPushPin.html
├── userLoginError.html
├── viewCorkboard.html
├── viewHomeScreen.html
├── viewPopularSites.html
├── viewPopularTags.html
├── viewPushPin.html
├── viewStatistics.html
└── watchCorkboard.html
Environment info:
Python 2.7.15
pip 10.0.1
pip list all
Package Version
---------------------------------- -------
appnope 0.1.0
asn1crypto 0.24.0
backports.shutil-get-terminal-size 1.0.0
blueprint 3.4.2
cffi 1.11.5
Click 7.0
cryptography 2.3.1
decorator 4.3.0
enum34 1.1.6
Flask 1.0.2
flask-blueprint 1.2.6
Flask-Login 0.4.1
Flask-MySQL 1.4.0
Flask-MySQLdb 0.2.0
Flask-WTF 0.14.2
idna 2.7
ipaddress 1.0.22
ipython 5.8.0
ipython-genutils 0.2.0
ItsDangerous 1.0.0
Jinja2 2.10
MarkupSafe 1.0
MySQL-python 1.2.5
mysqlclient 1.3.13
pathlib2 2.3.2
pbr 5.1.0
pexpect 4.6.0
pickleshare 0.7.5
pip 10.0.1
prompt-toolkit 1.0.15
ptyprocess 0.6.0
pycparser 2.19
Pygments 2.2.0
PyMySQL 0.9.2
scandir 1.9.0
setuptools 40.5.0
simplegeneric 0.8.1
six 1.11.0
stevedore 1.30.0
traitlets 4.3.2
virtualenv 16.0.0
virtualenv-clone 0.4.0
virtualenvwrapper 4.8.2
wcwidth 0.1.7
Werkzeug 0.14.1
wheel 0.31.1
WTForms 2.2.1
Thank you in advance!
python flask blueprint
python flask blueprint
asked Nov 21 at 4:03
user3626793
61
61
shouldn't there be an empty "init.py" file (add the underscores!) in the routes subdirectory? Also see docs.python.org/2/tutorial/modules.html
– gittert
Nov 21 at 9:21
add a comment |
shouldn't there be an empty "init.py" file (add the underscores!) in the routes subdirectory? Also see docs.python.org/2/tutorial/modules.html
– gittert
Nov 21 at 9:21
shouldn't there be an empty "init.py" file (add the underscores!) in the routes subdirectory? Also see docs.python.org/2/tutorial/modules.html
– gittert
Nov 21 at 9:21
shouldn't there be an empty "init.py" file (add the underscores!) in the routes subdirectory? Also see docs.python.org/2/tutorial/modules.html
– gittert
Nov 21 at 9:21
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53405105%2fpython-flask-blueprints-project-routes-loginscreen-import-login-blueprint-impor%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
shouldn't there be an empty "init.py" file (add the underscores!) in the routes subdirectory? Also see docs.python.org/2/tutorial/modules.html
– gittert
Nov 21 at 9:21