I have this strange error in my code, it started to show just like that - no changes in the code. The same code is working with no problems when I run it from pythonanywhere account, so it's something with my machine I guess. Here's the code: mydb = mysql.connector.connect( host='localhost', user='root', database='testdb' ) mycursor = mydb.cursor() mycursor.execute("SELECT * FROM mytable") db_result = mycursor.fetchall() full error: Exception ignored in: <function BaseMySQLSocket.__del__ at 0x000002B15E76E5E0> Traceback (most recent call last): File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\mysql\connector\network.py", line 149, in __del__ File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\mysql\connector\network.py", line 137, in shutdown TypeError: catching classes that do not inherit from BaseException is not allowed I've reinstalled python-mysql package, tried to upgrade it - no result. Continue reading...