0
I am trying to read a sqlite file in Jupyter Notebook, however this error appears : Operationalerror: no such table: someone can help me?
import sqlite3
conn = sqlite3.connect('escola.sqlite')
c = conn.cursor()
def leitura_todos_dados():
c.execute("SELECT * FROM escola")
for linha in c.fetchall():
print(linha)
leitura_todos_dados()
Operationalerror Traceback (Most recent call last) in () ----> 1 milk_all data() 2
in leitura_all data() 10 11 def milk_all data(): ---> 12 c.execute("SELECT * FROM school") 13 for linha in c.fetchall(): 14 print(line)
Operationalerror: no such table: school
Apparently there is no table "school" in the database.
– Woss
Colleague Anderson is right. The error message is very clear: there is no table called "school" in your database.
– Luiz Vieira
You have already created the tables and given the Inserts to capture the data?
– Marlysson
Hello sorry, when I generated the table in the database he created only the database and did not transfer the table with the data. I had a csv file and when I "transferred" the data to the db part of the data was not migrating, when I solved it worked. Thank you!
– Paula Santos
The message is indicating that the school table does not exist. Check your database and see if it actually exists.
– Marcelo Zochio