简体   繁体   中英

How to solve the traceback error, when it is not a code issue?

So I downloaded this project ( https://github.com/alectrocute/flasksaas ) on my machine. Interesting is, that on my other computer everything works great, but not on this one. I am stuck at the point, where I want to initialize the database with following command:

$python manage.py initdb

I reinstalled python, the modules etc., but it doesn't help. I checked my system environment variables in the settings (OS: Windows), everything seems fine.

Error which occurs:

Traceback (most recent call last):
  File "manage.py", line 4, in <module>
__init__.py, line 6, in <module>
    app.config.from_object('app.config')
NameError: name 'config_dev' is not defined

Expected result: "SQL database has been created."

After looking at the repo's Makefile , you'll find what each make target means:

  • install : run $ pip install -r requirements.txt
  • dev : copy (or link) the config_dev.py to config.py
  • prod : copy (or link) the config_prod.py to config.py

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM