2

I've got a XAMPP apache server, Python 2.7 and I've installed setuptools and all the Flask requirements. Still I cannot run setup.py, which generates the following error:

You need to specify DATABASE in settings.py, and ensure that Flask-SQLAlchemy is installed.

Since I've installed Flask alchemy it must be my settings.py or something else. This is the path to my (yet to be created) database.db:

DATABASE = 'C:\xampp\htdocs\maraschino\maraschino.db'

Any help on this would be greatly appreciated!

3
  • Post your solution as an answer and mark it as accepted. Commented Dec 19, 2011 at 23:04
  • I cannot mark it as accepted, since I have not enaugh rep :) But you can find the answer below. Commented Dec 20, 2011 at 12:57
  • 1
    Thx m8 :) It says now that I can't accept my own answer in 18 hours :) I'll try again tomorrow! Commented Dec 20, 2011 at 18:06

1 Answer 1

2

Problem already solved.

The solution is to change the 'slash' in the database path:

DATABASE = 'C:\xampp\htdocs\maraschino\maraschino.db'

must be:

DATABASE = 'C:/xampp/htdocs/maraschino/maraschino.db'

Result:

'Database sucessfully initialised'

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.