"Python 'banktype' cannot be converted to a MySQL type" error in django
When connecting to the banking portal, this error is given, which seems to be because the information is not being entered into the mysql database.
Of course, this works correctly locally on sqlite3, but when it comes to the server, this error is given
This is error:
TypeError at /gotogateway/
Python 'banktype' cannot be converted to a MySQL type
Request Method: GET
Request URL: https://omidzaferan.ir/gotogateway/
Django Version: 4.1.5
Exception Type: TypeError
Exception Value:
Python 'banktype' cannot be converted to a MySQL type
Exception Location: /home/omidzaf1/virtualenv/OmidZaferan/3.9/lib/python3.9/site-packages/mysql/connector/conversion.py, line 223, in to_mysql
Raised during: core.views.go_to_gateway_view
Python Executable: /home/omidzaf1/virtualenv/OmidZaferan/3.9/bin/python3.9
Python Version: 3.9.12
Python Path:
['',
'/home/omidzaf1/OmidZaferan',
'/home/omidzaf1/virtualenv/OmidZaferan/3.9/lib64/python39.zip',
'/home/omidzaf1/virtualenv/OmidZaferan/3.9/lib64/python3.9',
'/home/omidzaf1/virtualenv/OmidZaferan/3.9/lib64/python3.9/lib-dynload',
'/opt/alt/python39/lib64/python3.9',
'/opt/alt/python39/lib/python3.9',
'/home/omidzaf1/virtualenv/OmidZaferan/3.9/lib/python3.9/site-packages']
Server time: Tue, 31 Jan 2023 15:15:54 +0330