Hi all,
I run into a "deallocating None" error, if I use connect()/disconnect():
...
'None' refcount: 4
'None' refcount: 3
'None' refcount: 2
Fatal Python error: deallocating None
Python runtime state: initialized
Current thread 0x00007f9dfb640740 (most recent call first):
File "test.py", line 19 in <module>
Any ideas? Here my environment:
python: 3.8.10
OS: ubuntu 20.04
mysql-connector-python: 8.0.33
Samplecode to reproduce, just replace mysql.connector.connect() parameter with matching once:
import mysql.connector
from mysql.connector import Error
import sys
import time
if __name__ == "__main__":
while True:
try:
print(f"'None' refcount: {sys.getrefcount(None)}")
connection = mysql.connector.connect(
host = host,
port = port,
user = user,
passwd = password,
database = dbname
)
connection.disconnect()
time.sleep(0.01)
except Error:
print("error")
break
I run into a "deallocating None" error, if I use connect()/disconnect():
...
'None' refcount: 4
'None' refcount: 3
'None' refcount: 2
Fatal Python error: deallocating None
Python runtime state: initialized
Current thread 0x00007f9dfb640740 (most recent call first):
File "test.py", line 19 in <module>
Any ideas? Here my environment:
python: 3.8.10
OS: ubuntu 20.04
mysql-connector-python: 8.0.33
Samplecode to reproduce, just replace mysql.connector.connect() parameter with matching once:
import mysql.connector
from mysql.connector import Error
import sys
import time
if __name__ == "__main__":
while True:
try:
print(f"'None' refcount: {sys.getrefcount(None)}")
connection = mysql.connector.connect(
host = host,
port = port,
user = user,
passwd = password,
database = dbname
)
connection.disconnect()
time.sleep(0.01)
except Error:
print("error")
break