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

.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.

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
24,526 Points

Same here, can't follow along in workspaces.