Answered step by step
Verified Expert Solution
Question
1 Approved Answer
as you can see I pip all the requirements to run the app successfully but give me the same error what the solution for this
as you can see I pip all the requirements to run the app successfully but give me the same error what the solution for this one
and I try from MYSQLdb import MYSQL ... mysql = MYSQL (app)
still same problem !!!! ..... thanks in advance
File Edit Format View Help pip install Flask-MySQL db pip install mysql-connector pip install flask-bcrypt pip install PyMySQL pip install mysql-connector-python import pymysql import mysql.connector as sql_db import MySQLdb.cursors import MySQL dbfrom MySQL db import MYSQL import re import mysql.connector as mysql host = mydb = sql_db.connect "remotemysql.com", user = "CgMqc7wq4" password = "AOnouv1030" database = 'eCgMqC7wq4" cursor=mydb. cursor() cursor = mysql.connection.cursor (MySQL db. cursors.DictCursor) cursor.execute('SELECT * FROM users WHERE user name = %S AND password - %s', (username, pas account - cursor.fetchone() 1tst/ rv = selt.dispatch_request() File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1936, in dispat return self.view_functions[rule.endpoint](**req.view_args) File "/home/ubuntu/workspace/1tst/application.py", line 111, in login3 cursor - mysql.connection.cursor(MySQLdb.cursors.DictCursor) AttributeError: module 'mysql.connector.connection has no attribute cursor. INFO: 192.168.39.1 - - [01/Jan/2021 22:29:59] "POST /login3 HTTP/1.0- 500 - Google Sticky NaStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started