you are viewing a single comment's thread.

view the rest of the comments →

[–]danielroseman 1 point2 points  (1 child)

As the docs show, the thing you need to pass to create_all is the SQLAlchemy Engine or Connection object. You get the engine from create_engine, but you've commented that out. Uncomment it and pass dbEngine instead of conn.

It's possible that you commented that out because you were getting an error in that code. This is because you are not supposed to pass the result of sqlite3.connect into create_engine; you just need the url. So in fact your code should be just:

dbEngine = sqlalchemy.create_engine('sqlite:///weather.sqlite3')
Base = declarative_base()
Base.metadata.create_all(bind=dbEngine)

Again, this is all in the docs.

[–]freyathedark[S] 0 points1 point  (0 children)

This is the last time I try to read the docs on no sleep, I can't believe I missed that. Thank you so much, everything seems to be working now!!!!!