rosshamish / classtime

university schedule generation and course data API
MIT License
16 stars 2 forks source link

Being bad, and can't get sqlalchemy to work on Mac #11

Closed ahoskins closed 9 years ago

ahoskins commented 9 years ago

screen shot 2014-10-16 at 8 43 20 am

rosshamish commented 9 years ago

Oo, this looks familiar. Maybe your table structure is bad/old somehow. It might help to delete it and re-create it.

$ python manage.py delete_db $ python manage.py create_db $ python manage.py seed_db

ahoskins commented 9 years ago

I feel so dumb that it took me this long to try that. I forgot delete_db was a thing. That actually worked though.

So where is the DB actually stored? I can't find it anywhere in the the project folder or the sql-alchemy folder in the Python env.

rosshamish commented 9 years ago

Bunter's gonna be so sad to hear this.

I've looked into that and I'm still not quite sure lol. SQLite is a filesystem based DB I believe, and its location is specified in settings.py. But it seems like it doesn't show up in the filesystem at all, so I'm not exactly sure.

ahoskins commented 9 years ago

Hmm, last night I made a number of different virtualenv's and it never worked for any of them. And since the fix was to just delete that database, it seems like the database must be completely independent of the Python environment. (ie, starting a new Python env doesn't seem to be a fresh start for the database)

rosshamish commented 9 years ago

Ya good point. Maybe it's literally at /tmp/.db ? I actually don't know Mac filesystem structure, do you have a /tmp directory?

ahoskins commented 9 years ago

screen shot 2014-10-16 at 9 15 23 am

This is the the db in: /tmp/angular_flask.db Seems to be the one.

rosshamish commented 9 years ago

Cool.