Raspberry Pi - Data Logging and Databases
Why does this Python code raise an error when executed on Raspberry Pi?
Assuming the table
import sqlite3
conn = sqlite3.connect('data.db')
cursor = conn.cursor()
cursor.execute('SELECT * FROM sensor_data')
print(cursor.fetchall())
conn.close()Assuming the table
sensor_data has not been created yet.