On Thu, Dec 11, 2014 at 12:23 AM,  <samp4...@gmail.com> wrote:
> I had an issue while running my flask application:
> https://github.com/mitsuhiko/flask/issues/1274
>
> The suggested workaround is to add /home/sam to sys.path, however, if I
> remove the "pantry." part from the import statements and execute from within
> the pantry/ directory with `python3.4 run.py` it runs. Having to add a
> package to sys.path before running it or even having to remove part of the
> import statement as mentioned doesn't seem right, but that's not the
> problem.
>
> The problem now is that my application can't find the table:
> "sqlalchemy.exc.OperationalError: (OperationalError) no such table: food
> 'SELECT food.id AS food_id, food.name AS food_name, food.amount AS
> food_amount \nFROM food' ()"
>
> I've created the db before though:
> https://gist.github.com/uunsamp/7650f5a3882fc76ad314
>
> I don't understand why that wouldn't be sufficient. I'm all eyes and ears if
> anyone has the patience to respond!
>

Are you sure that the database you created in the first step is the
same one you are using at runtime? Using Flask-SQLAlchemy obscures
some of the details here - I would probably put a print statement
inside sqlalchemy.create_engine to see exactly what file is being
used, and I would use the sqlite3 command line tool to inspect the
contents of that file.

Hope that helps,

Simon

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to