Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP PHP & Databases with PDO Getting Started With PDO Introductions

.open error in sqlite

I am launching the workspace and following the steps in the video When using .open to import the database I get the following error

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

When I entered .help to see the available commands .open was not in the list.

4 Answers

Jose Soto
Jose Soto
23,407 Points

Hey, I realized the same thing. When I open the workspace and then open sqlite3, I see it is version 3.7.17. However, in the video, it uses version 3.8.2.

You can still continue the tutorial by opening sqlite by typing 'sqlite3 database.db ' instead of just 'sqlite3':

treehouse:~/workspace$ sqlite3 database.db                                                                                                                                                                   
SQLite version 3.7.17 2013-05-20 00:56:22                                                                                                                                                                    
Enter ".help" for instructions                                                                                                                                                                               
Enter SQL statements terminated with a ";"                                                                                                                                                                   
sqlite> .databases                                                                                                                                                                                           
seq  name             file                                                                                                                                                                                   
---  ---------------  ----------------------------------------------------------                                                                                                                             
0    main             /home/treehouse/workspace/database.db

thank you it works... they should fix that

Thank you!!!

Misty Shaw
Misty Shaw
10,825 Points

Thank you! This works for me as well.

Hemadri Sen
Hemadri Sen
8,508 Points

I tried it but it is not working for me

Robert Mews
Robert Mews
11,540 Points

It's not working for me either. Bump.

EDIT: In the video it says to use the following command

.open database.db

However, if you follow Jose instructions above you do not even need to enter this command in the console. The video is outdated.

Jonathan Leopard
Jonathan Leopard
6,919 Points

Getting the same issue as everyone else. They really need to fix this :/

Nicholas Nelson
Nicholas Nelson
23,731 Points

Same here, can't follow along in workspaces.