You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.
I write a .py script can extract mysql data and print it out, I want to make the html page run this script and face mysql.connector.errors.InterfaceError, but .py script individually works fine
environment: I put both .py and .html in winSCP to make the page live
get_sql_where.py (the script can execute fine by itself, I ran get_sql_where.py in cmd works fine )
<!DOCTYPE html>
<!-- myPyScriptRun.html -->
<html><head>
<link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" />
<script defer src="https://pyscript.net/latest/pyscript.js"></script>
</head><body>
<b><p>this is the info from sql</p></b><br>
<py-config>
packages = ["mysql-connector-python", "PyMySQL"]
</py-config>
<py-script src="./get_sql_where.py" />
</body></html>
Main Problem: face mysql.connector.errors.InterfaceError: 2003
error message
Traceback (most recent call last):
File "/lib/python3.10/site-packages/mysql/connector/network.py", line 600, in open_connection
self.sock.connect(sockaddr)
BlockingIOError: [Errno 26] Operation in progress
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/lib/python3.10/site-packages/_pyodide/_base.py", line 435, in eval_code
.run(globals, locals)
File "/lib/python3.10/site-packages/_pyodide/_base.py", line 304, in run
coroutine = eval(self.code, globals, locals)
File "<exec>", line 9, in <module>
File "/lib/python3.10/site-packages/mysql/connector/pooling.py", line 294, in connect
return MySQLConnection(*args, **kwargs)
File "/lib/python3.10/site-packages/mysql/connector/connection.py", line 167, in __init__
self.connect(**kwargs)
File "/lib/python3.10/site-packages/mysql/connector/abstracts.py", line 1178, in connect
self._open_connection()
File "/lib/python3.10/site-packages/mysql/connector/connection.py", line 571, in _open_connection
self._socket.open_connection()
File "/lib/python3.10/site-packages/mysql/connector/network.py", line 602, in open_connection
raise InterfaceError(
mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on '196.168.1.141:3306' (26 Operation in progress)
I tried super hard to achieve this goal, hope someone can give a hand
I have read through link 01 , link 02 discussion but I don't find the fit solution for my case, thanks
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I write a .py script can extract mysql data and print it out, I want to make the html page run this script and face
mysql.connector.errors.InterfaceError
, but .py script individually works fineenvironment: I put both .py and .html in winSCP to make the page live
Main Problem: face
mysql.connector.errors.InterfaceError: 2003
I tried super hard to achieve this goal, hope someone can give a hand
I have read through link 01 , link 02 discussion but I don't find the fit solution for my case, thanks
The text was updated successfully, but these errors were encountered: