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

AttributeError: module 'config' has no attribute 'MYSQL_USER' #79

Open
yucluo opened this issue May 29, 2024 · 6 comments
Open

AttributeError: module 'config' has no attribute 'MYSQL_USER' #79

yucluo opened this issue May 29, 2024 · 6 comments

Comments

@yucluo
Copy link

yucluo commented May 29, 2024

When I run python setup.py as instructed I get this error:

(base) Yuchens-Air-3:mpeds-coder yuchenluo$ python setup.py
Traceback (most recent call last):
File "/Users/yuchenluo/Desktop/mpeds-coder/setup.py", line 1, in
from database import db_session, init_db
File "/Users/yuchenluo/Desktop/mpeds-coder/database.py", line 7, in
(config.MYSQL_USER, config.MYSQL_PASS, config.MYSQL_DB, config.MYSQL_SOCK, 'utf8'),
AttributeError: module 'config' has no attribute 'MYSQL_USER'

@alexhanna
Copy link
Member

You need to make a copy of config.py-example and rename it to config.py, then change the credentials for your MySQL database.

@yucluo
Copy link
Author

yucluo commented May 29, 2024 via email

@alexhanna
Copy link
Member

I think you need to pip install mysql-python

@yucluo
Copy link
Author

yucluo commented Jun 3, 2024 via email

@yucluo
Copy link
Author

yucluo commented Jun 3, 2024 via email

@alexhanna
Copy link
Member

Ah, there's your problem. This will only run on Python 2. So you'll have to install Python 2 in a separate location on your machine.

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

2 participants