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

PHP PHP & Databases with PDO Getting Started With PDO Introductions

Darren Joy
Darren Joy
19,573 Points

.open command error

Following along in workspaces.. get this error

sqlite> .open database.db Error: unknown command or invalid arguments: "open". Enter ".help" for help

This seems to suggests that for some reason it is not recognizing the . (dot) before the open?

Anyone see this error themselves and/or know of a workaround?

4 Answers

Emiliano Ceccon
Emiliano Ceccon
931 Points

Hi!

You can try running the command ".help" and see if the command ".open" appears in the list, I had read that it seems that it has been removed or deprecated, so you can try open the database file without the .open keyword:

treehouse:~/workspace$ sqlite3 database.db

I hope I've helpful to you!

David Pena Abad
David Pena Abad
16,288 Points

Thanks Emiliano,

I did have the same problem and with your instructions I could open the file.

See you soon,

David

Emiliano Ceccon
Emiliano Ceccon
931 Points

Thanks David, I'm glad that my answer has been helpful to you!

Atrian Wagner
Atrian Wagner
24,811 Points

Thank you! This is the solution. It's unfortunate that they couldn't update the video or the teacher's notes. The worst part is that with all the different threads of people asking this same question, some of the answers listed in response to the other ones are just wrong. Thank you for providing the correct answer.

Daniel Robert Prieto
Daniel Robert Prieto
1,974 Points

It doesn't work for me... 1 minute in and I can't continue :-(

Emiliano Ceccon
Emiliano Ceccon
931 Points

Hi Daniel, what do you mean with "1 minute in and I can't continue"?

.open database.db is not working.... EVEN WITH sqlite3 database.db at the start. opening .help doesn't show any command .open !?

What to do ?

oh.... ok no .open needed just tables and go.... :-)