I'm trying to create a table:
import sqlite3
def criar_tab_contato(conexao):
cursor = conexao.cursor()
sql = """
CREATE TABLE IF NOT EXISTS contato(
nome text,
telefone text,
senha text
);
"""
cursor.execute(sql)
conexao = sqlite3.connect("banco.contato")
criar_tab_contato(conexao)
conexao.close()
But it displays the following error:
/data/user/0/org.qpython.qpy3/files/bin/qpython-android5.sh "/storage/emulated/0/Download/.last_tmp.py" && exit
lated/0/Download/.last_tmp.py" && exit <
Traceback (most recent call last):
File "/storage/emulated/0/Download/.last_tmp.py", line 18, in <module>
conexao = sqlite3.connect("banco.contato")
sqlite3.OperationalError: unable to open database file
1|whyred:/ $