Summary
MySQLInterfaceError: Python type numpy.int64 cannot be converted
Traceback:
File "C:\Users\Akmal\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 552, in _run_script
exec(code, module.__dict__)File "D:\Semester 8\PA\dataset\app.py", line 36, in <module>
main()File "D:\Semester 8\PA\dataset\app.py", line 31, in main
uploadData.show_menu8()File "D:\Semester 8\PA\dataset\view\uploadData.py", line 82, in show_menu8
UploadData()File "D:\Semester 8\PA\dataset\view\uploadData.py", line 20, in UploadData
insert_data_mahasiswa(df_mhs)File "D:\Semester 8\PA\dataset\query.py", line 115, in insert_data_mahasiswa
if check_existing_nimMhs(nim):
^^^^^^^^^^^^^^^^^^^^^^^^^^File "D:\Semester 8\PA\dataset\query.py", line 99, in check_existing_nimMhs
c.execute(query, (nim_mhs,))File "C:\Users\Akmal\AppData\Local\Programs\Python\Python311\Lib\site-packages\mysql\connector\cursor_cext.py", line 317, in execute
prepared = self._cnx.prepare_for_mysql(params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "C:\Users\Akmal\AppData\Local\Programs\Python\Python311\Lib\site-packages\mysql\connector\connection_cext.py", line 780, in prepare_for_mysql
result = self._cmysql.convert_to_mysql(*params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Steps to reproduce
Code snippet:
add code here
If applicable, please provide the steps we should take to reproduce the error or specified behavior.
Expected behavior:
Explain what you expect to happen when you run the code above.
Actual behavior:
Explain the undesired behavior or error you see when you run the code above.
If you’re seeing an error message, share the full contents of the error message here.
Debug info
- Streamlit version: (get it with
$ streamlit version
) - Python version: (get it with
$ python --version
) - Using Conda? PipEnv? PyEnv? Pex?
- OS version:
- Browser version:
Requirements file
Using Conda? PipEnv? PyEnv? Pex? Share the contents of your requirements file here.
Not sure what a requirements file is? Check out this doc and add a requirements file to your app.
Links
- Link to your GitHub repo:
- Link to your deployed app:
Additional information
If needed, add any other context about the problem here.