Questions tagged [sqlite3-python]

83 questions
0
votes
0 answers

issue- invalid literal for int() with base 10:

I made my python GUI and then maed database on sqlite3 of employee where i mentioned this thing in my database CREATE TABLE employee ( id int primary key, name text, salary int ); i use sqlite as db and python for gui project.
0
votes
1 answer

Python SQLite3 command won't execute in python but also causes no reported errors

I want the table to have a maximum of three rows so once the table has 3, it should delete the oldest one (rowid 1) and then add on the new one. In the case that the table doesn't exist yet or hasn't reached 3 rows, it will just create the record…
NaMcA507
  • 3
  • 2
0
votes
0 answers

Code in Python works, but inside pyscript it get this error

This is the error I get: Traceback (most recent call last): File "/lib/python3.10/site-packages/_pyodide/_base.py", line 435, in eval_code .run(globals, locals) File "/lib/python3.10/site-packages/_pyodide/_base.py", line 304, in run coroutine =…
Recknover
  • 1
  • 1
0
votes
2 answers

sqlite exe : database file path has hyphen : "unknown option: -"

I am new to SQLITE. I am trying to open a database through Sqlite3.exe shell. My database file path has hyphen in it.. on entering .open C:\Users\Admin\OneDrive - batch\db.sqlite3 i am getting below error unknown option: - can anyone help.. I tried…
0
votes
0 answers

I can't update the sqlite3 version in python 3.8 command line?

I am following the pip steps in the manual for the installation of readthedocs. However, in the requests of this installation, sqlite3 has specified a minimum of 3.19 and above. I am upgrading sqlite3 version 3.17 to 3.40 on redhat 7.9 linux server.…
sysoptr
  • 1
  • 2
0
votes
0 answers

sqlite3.OperationalError: no such function: sqrt in python:3.11-buster image

I'm currently running into issues within the `python:3.11-buster` image whereby recent sqlite3 changes which added in v.3.35 of sqlite aren't working, e.g., sqrt (https://antonz.org/sqlite-3-35/): sqlite3.OperationalError: no such function:…
Micheal J. Roberts
  • 3,735
  • 4
  • 37
  • 76
-1
votes
0 answers

SQLite 3 corrupted database is asking for password, but password was never set to it

I was using photo editing program called capture one, everything was fine until my project file stopped opening. In project file I have .cocatalogdb file, which is clearly just a SQLite Database (it have SQLite format 3 at the beginning). So, if I…
Richard
  • 97
  • 8
-1
votes
1 answer

sqlite3 syntax for creating rows with 2 always unique column values

I have a table "statistic" that contains guild_id, category and number I need to create rows with values that takes my func, but they need to be both unique: If 1 column value and 2 column value are same: skip This is my code: def…
sndmndss
  • 9
  • 5
-1
votes
0 answers

TypeError: module() takes at most 2 arguments (3 given) [sqlite3_Python3.9]

I have this .py and .kv for a fmea project, any idea for the solution? Thank you so much. .py import os import sys import pathlib from time import time from kivy.config import Config Config.set('kivy', 'keyboard_mode', 'systemanddock') from…
-1
votes
2 answers

How do i access another page in flask

I have three pages the home page and the add page and result page i can acess the home page but when i click the button to access the add page i can't Here is the HTML code:
-1
votes
2 answers

Getting "sqlite3.OperationalError: near "ALTER": syntax error" when modifying datatype of a column

Our group is tasked to create and modify SQL tables (we chose to do it in Python) including the ALTER command but when we try to alter dataype of a column Job_id from CHAR (10) to VARCHAR (10), we always get this syntax. Here's the code: import…
-1
votes
1 answer

sqlite3.OperationalError: near "?": syntax error while trying to replace values

I'm a new coder around here and I've been struggling to find out why there is a syntax error in my code but I cannot understand why. c.execute("UPDATE piesemagazin SET (?,?,?,?,?) WHERE IdProdus=?",(id, nume, tip, numar, pret,id)) I have tried to…
-1
votes
1 answer

I wanna make eco bot on discord.py

CODE import discord from discord.ext import commands import sqlite3 from config import settings bot = commands.Bot(command_prefix = settings['prefix'], intents = discord.Intents.all()) bot.remove_command('help') connection =…
Venzo
  • 1
-1
votes
2 answers

Python Sqlite, Insert into table and make all non specified values Null, then update Null values one by one

I am currently creating dynamic sqlite tables in Python. The table in question is generated as follows: year_list = range(start_year, end_year+1) dbs_to_create = ["Revenue", "Sale", "Rev_Maintenance",...] for db_name in dbs_to_create: …
sword134
  • 91
  • 1
  • 11
-1
votes
1 answer

The browser or proxy sent a request that this server could not understand, 404 Bad request

I am a beginner in this field and in the process of preparing a final project for a CS50 course using Flask, Python and SQLite 3 The error appears when I try to delete the question whose position is first in the list, but the code works for the rest…
Sam
  • 1
  • 2