Brother I got some errors, whenever I entered the details in signup page it displays some errors like raise_for_error,raise_for_exception ,_read_packet
thanks too much brother , note to those people who may get my errors : if i delete the table and try the code i got error says that table not exist , for that i changed the position of the code of creation the table to exception part and added '' IF NOT EXISTS " ,to not get an other error that says : 'table is already exists'
The last part , Where you check for an existing Username... 34:50 This specific line: mycursor.execute(query, (usernameEntry.get())) It's crazy that you don't get a ProgrammingError. That line lacks a Comma for me: mycursor.execute(query, (usernameEntry.get(),))
if anyone is getting issue with connecting mysql database with python . You can try connecting the database with another method using 'mysql connector' method. You can refer youtube video of 'Tech with tim youtube channel' ..... video name is 'Python Mysql tutorial'.
Hi , I make a page consisting a button and give the command to open a new page without destroying the previous page it works but when I add image in second page and try to open it by first page without destroying first , then it doesn't show me that image that I add to second page But when I run the second page Individually it works properly and also shows that image which i add to it can you please help me to solve this problem
Hi Coding Lifestyle, may I ask a favor please? Can you please recreate this program or at least the part where you connect your python to MySQL, but this time please, use PostgreSQL database please?
mycursor.execute(query,(userentry.get())) in this what is happening? str(ashakarthikeyan), it must be of type list, tuple or dict Im getting this error
When I have run command pip install pymysql I am getting an error New connection error How can I fix it sir please reply fast I need this system for my website 🙏🙏🙏🙏🙏🙏🙏
31:00 after clicking the signup button, 🚫 no dialog box appears; 🚫 Entry field not get cleared; 🏳️ Database and table created, but with 0 table data. And, since I was executing the .py file through command prompt, it displays an exception like below 👇🏻 TypeError: 'str' object is not callable Please 🙏 help with this code Sir
line 39, in connect_database mycursor.execute(query,(emailEntry.get(),usernameEntry.get(),passwordEntry.get())) line no.39->mycursor.execute(query,(emailEntry.get(),usernameEntry.get(),passwordEntry.get()))
@@noons186 it can be because of password encryption for which you have to import modules like hashlib, cryptography, credentials(in python) you should also grant permission to user from database cmd for that you search on google because i have forgotten the command😅😅 according to me this will solve the issue and also take care that you are importing right module for database you are using ( like mysql for mysql db etc) create proper cursor and check the statements thoroughly once again. i hope this will solve your issue.
At last 5 min you said about an error message that if username already existed in our database then it should show error that it has already existed. How can i set the error message like email already existed along with username existed condition error msg condition. Elif is not working for that.
sir i m facing error in python idle mysql.connector.errors.ProgrammingError: Could not process parameters: str(prakash), it must be of type list, tuple or dict
@@codinglifestyle4u sir error is resolved i was using " mycursor.execute(query,(usernameEntry.get())) " this but now i used [ ] instead of ( ) " mycursor.execute(query,[usernameEntry.get()]) " but Thank you sir..
I had this issue - had to drop the drop the database 'userdata' in MySQL workbench then when I ran the code and it recreated the database it could then create the table fine.
if emailEntry.get()=='' or usernameEntry.get()=='' or passwordEntry.get()=='' or confirmEntry.get()=='': messagebox.showerror('Error','All Fields Are Required') elif passwordEntry.get() != confirmEntry.get(): messagebox.showerror('Error', 'Password Mismatch') elif check.get()==0: messagebox.showerror('Error', 'Please accept Terms & Condition') else: try: con=pymysql.connect(host='localhost',user='root',password='1234') mycursor=con.cursor() except: messagebox.showerror('Error', 'Database Connectivity Issue, Please Try Again') return try: query = 'create database userdata' mycursor.execute(query) query = 'use userdata' mycursor.execute(query) query = 'create tabel data(id int auto_increment primary key not null,email varchar(50),username varchar(100),password varchar(50))' mycursor.execute(query) ## All work has been done smoothly but after the return [create data base ] is not working properly.. Showing Error =Database Connectivity Issue, Please Try Again')
import re def is_valid_email(email): # Regular expression for email validation pattern = r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$' # Check if the email matches the pattern if re.match(pattern, email): return True else: return False # Test the function email_to_check = "example@example.com" if is_valid_email(email_to_check): print("Valid email!") else: print("Invalid email!")
mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%s' at line 1
Help. I get these errors when trying to sign up: Exception in Tkinter callback Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\tkinter\__init__.py", line 1948, in __call__ return self.func(*args) ^^^^^^^^^^^^^^^^ File "C:\Users\maksi\PycharmProjects\pythonProject\HelloWorld\signup.py", line 42, in connect_database mycusrsor.execute(query,(email_Entry.get(),username_Entry.get(),password_Entry.get())) File "C:\Users\maksi\PycharmProjects\pythonProject\HelloWorld\venv\Lib\site-packages\pymysql\cursors.py", line 153, in execute result = self._query(query) ^^^^^^^^^^^^^^^^^^ File "C:\Users\maksi\PycharmProjects\pythonProject\HelloWorld\venv\Lib\site-packages\pymysql\cursors.py", line 322, in _query conn.query(q) File "C:\Users\maksi\PycharmProjects\pythonProject\HelloWorld\venv\Lib\site-packages\pymysql\connections.py", line 558, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\maksi\PycharmProjects\pythonProject\HelloWorld\venv\Lib\site-packages\pymysql\connections.py", line 822, in _read_query_result result.read() File "C:\Users\maksi\PycharmProjects\pythonProject\HelloWorld\venv\Lib\site-packages\pymysql\connections.py", line 1200, in read first_packet = self.connection._read_packet() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\maksi\PycharmProjects\pythonProject\HelloWorld\venv\Lib\site-packages\pymysql\connections.py", line 772, in _read_packet packet.raise_for_error() File "C:\Users\maksi\PycharmProjects\pythonProject\HelloWorld\venv\Lib\site-packages\pymysql\protocol.py", line 221, in raise_for_error err.raise_mysql_exception(self._data) File "C:\Users\maksi\PycharmProjects\pythonProject\HelloWorld\venv\Lib\site-packages\pymysql\err.py", line 143, in raise_mysql_exception raise errorclass(errno, errval) pymysql.err.ProgrammingError: (1146, "Table 'userdata.data' doesn't exist")