Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python SQLAlchemy Basics Introduction to SQLAlchemy Create and Read with SQLAlchemy

Suneeta Modekurty
Suneeta Modekurty
279 Points

When I type .tables in sqlite console, i don't see users table

All code runs fine but When I type .tables in sqlite console, i don't see users table

Suneeta Modekurty
Suneeta Modekurty
279 Points

I did use users.db and yes, it’s creating an empty db along with the actual db. How do I fix it?

2 Answers

Steven Parker
Steven Parker
230,274 Points

Did you forget to specify "users.db" as the command-line argument when starting the console?

Without it, SQLite creates a new, empty database.

Steven Parker
Steven Parker
230,274 Points

I'm not sure what you mean by "empty db along with the actual db". It should start with just one DB attached, either a new one or one that was loaded. Perhaps you could show the exact commands you use, both to start the console and to examine the tables.

Steven Parker
Steven Parker
230,274 Points

For example, here's exactly what I type in the console and what I see (my inputs in italics):

treehouse:~/workspace$ sqlite3 users.db
SQLite version 3.11.0 2016-02-15 17:29:24
Enter ".help" for usage hints.
sqlite> .tables
users
sqlite>

Suneeta Modekurty
Suneeta Modekurty
279 Points

Sorry but I am unable to understand what you mean. I will figure it out

Steven Parker
Steven Parker
230,274 Points

Did you figure it out? If not, please post the exact commands you are entering and share a snapshot of your workspace.