Cannot connect '[email protected]'.. no response on localhost

Screen Link:

My Code:

%load_ext sql
%sql sqlite:///factbook.db

It should output:
'Connected: [email protected]'
But it shows nothing from localhost.

I have tried to continue the project, write

FROM sqlite_master
WHERE type = 'table';

It outputs the columns’ names, but no values or table. It shows:

I have downloaded facebook.db along with the file.
Anything I can do to make it work locally?

Thanks a lot for the help :smiley:

1 Like

Hmm…that’s odd.

I’m running it locally right now and I am able to select from the facts table which is missing in yours. Is the factbook.db file in the same folder/directory as the .ipynb file?

1 Like

yes, I think so…
Could be some very basic reasons since this is the first time I use Jupyter…

1 Like

Yeah, that looks about right, similar to my own.

Could be.

If it’s not too much work, can you upload the .ipynb and .db files? I’ll see if I can replicate the issue on my end.

1 Like

CIA Factbook Data.ipynb (2.2 KB)
factbook.db (66 KB)
Here you go~:)

Click here to view the jupyter notebook file in a new tab

1 Like

I tried your files and they do work on my computer.

I wonder if it’s a pathing issue. Try modifying the sqlite path to refer to a database that doesn’t exist. That should create a new db in the same directory.

For example:

%load_ext sql
%sql sqlite:///test.db
1 Like

A new db is created. But there is no output following the cell…

Yep, that’s also the same in my notebook. Loading factbook.db will also not output anything in my notebook but I can still see the tables nonetheless.

Hmm…I’m stumped really. Could be an issue with Anaconda but I’m not so sure.

1 Like

Sorry to put you through many steps.

One more thing to try: rename the factbook.db to something else and load with that new name.

Or use an absolute path instead:

1 Like

Hi @wanzulfikri
Thanks a lot for all the time and help!
You know what, it is solved by classic restart it method…
I closed everything and start over again. Now the factbook.db can be normally accessed…

Thanks again and have a nice one:)

That is interesting. That should have been the default answer to many issues in Jupyter notebook haha, and I missed that.

1 Like

Thank for your time on my stupid question. I should have tried that first…
All the new signs %% and prerequisites before I start use Jupyter make my mind empty for finding a solution.
But now I think I am a little bit better than before:D

1 Like

No worries.

It’s a common for things to be weird with Jupyter notebook and getting into the habit of rerunning all cells should make things work better again most of the time.

Extra (if you like British comedy):

1 Like

hahaha, love it.
Always works!

1 Like