Category : mysql

I have JSON file, I need to saved annotated image from JSON file python? how would I go about saving it to an image file (.jpeg) {"annotations": [{"image_id": 0, "file_name": "img01.jpg", "objects": [{"object_id": 0, "class": "car", "position": [396.5, 770.25, 43.0, 76.5]}, {"object_id": 1, "class": "car", "position": [1045.5, 816.25, 34.0, 76.5]}, {"object_id": 2, "class": "car", "position": ..

Read more

I am working with mySQL in Python with the PyMySQL module handling the connection. dbCursor is the cursor object. I have the following statement: statement = f"INSERT INTO Machine_status (timestamp, num_of_char, STATUS, emergency_status) VALUES ({timestamp},{num_of_char},{status},{emergency_status})" dbCursor.execute(statement) However, whenever I try to execute this statement, the program hangs. This is perplexing because this statement similar to ..

Read more

Good Day, I’m trying to create a login form that uploads data to a database created with MySQL. However, when the user wants to login I get this error: runfile(‘C:/Users/ariel/OneDrive/Documents/400L/SIWES/NH PYTHON/PYTHON/ecommerce.py’, wdir=’C:/Users/ariel/OneDrive/Documents/400L/SIWES/NH PYTHON/PYTHON’) Reloaded modules: ecommerce_support Exception in Tkinter callback Traceback (most recent call last): File "C:Usersarielanaconda3envsspyderlibsite-packagesmysqlconnectorconnection_cext.py", line 506, in cmd_query self._cmysql.query(query, _mysql_connector.MySQLInterfaceError: You have ..

Read more

This is the code i am entering in python import mysql.connector as ms mydb=ms.connect(host="local host",user="root",password="12345",database="electricity") mycursor=mydb.cursor() mycursor.execute("show tables") but its not working and giving out a wierd error Traceback (most recent call last): File "C:UsersAnantAppDataLocalProgramsPythonPython39libsite-packagesmysqlconnectornetwork.py", line 547, in open_connection addrinfos = socket.getaddrinfo(self.server_host, File "C:UsersAnantAppDataLocalProgramsPythonPython39libsocket.py", line 953, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, ..

Read more

hi write program around 170 line,but i am getting issue in 158th line can any one explain what i made mistake; note *** problem line has given bold from tkinter import * from PIL import ImageTk import mysql.connector from tkinter import messagebox root=Tk() class mainwindow : def __init__(self,root): self.root=root self.root.title("Login System") self.root.geometry("1200×700+200+70") self.root.resizable(False,False) self.image=ImageTk.PhotoImage(file="brochure outside.jpg") ..

Read more

how to create a program wherein the user will input the address (network), username, and password, and program will try to login to your MySQL Database Server. If all credentials are correct, Display "Login Successful",’ if not, display "Login Error". try – catch / try – except on Python Source: Python..

Read more