Ao realizar as alterações da aula, estou obtendo o seguinte erro:
Traceback (most recent call last):
File "C:\Users\admin\PycharmProjects\jogoteca\venv\lib\site-packages\mysql\connector\abstracts.py", line 494, in config
DEFAULT_CONFIGURATION[key]
KeyError: 'upload_path'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/admin/PycharmProjects/jogoteca/jogoteca.py", line 10, in <module>
db = mysql.connector.connect(
File "C:\Users\admin\PycharmProjects\jogoteca\venv\lib\site-packages\mysql\connector\__init__.py", line 265, in connect
return MySQLConnection(*args, **kwargs)
File "C:\Users\admin\PycharmProjects\jogoteca\venv\lib\site-packages\mysql\connector\connection.py", line 104, in __init__
self.connect(**kwargs)
File "C:\Users\admin\PycharmProjects\jogoteca\venv\lib\site-packages\mysql\connector\abstracts.py", line 957, in connect
self.config(**kwargs)
File "C:\Users\admin\PycharmProjects\jogoteca\venv\lib\site-packages\mysql\connector\abstracts.py", line 496, in config
raise AttributeError("Unsupported argument '{0}'".format(key))
AttributeError: Unsupported argument 'upload_path'
Onde estou acreditando que está erro ficou assim:
db = mysql.connector.connect(
host="localhost",
user="root",
port = 3306,
password="pita",
database = "jogoteca",
auth_plugin='mysql_native_password',
upload_path= os.path.dirname(os.path.abspath(__file__)) + '/uploads'
)
Ou será que é em outro lugar?