<class 'OSError'> __syscall_getsockname 3 #1305
-
Checklist
What happened?Can someone help me with this. Thank You. Here's the code.
What browsers are you seeing the problem on? (if applicable)Microsoft Edge Console infoNo response Additional Context |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It appears that that PYZK uses the socket module to make it's connections (to a timeclock system or similar, I'm guessing). The socket module is one of the modules not fully supported/supportable in Pyodide due to limitations within the browser-window environment - the browser simply doesn't provide access to the same kind of low-level networking primitives that a native OS does. One potential way around this, though not a simple one, would be to re-implement the connection using a WebSocket, the in-browser equivalent of a socket. Perhaps by subclassing the ZK Class or similar? Since this is not a PyScript-specific issue, I'm going to convert it to a Discussion. |
Beta Was this translation helpful? Give feedback.
It appears that that PYZK uses the socket module to make it's connections (to a timeclock system or similar, I'm guessing). The socket module is one of the modules not fully supported/supportable in Pyodide due to limitations within the browser-window environment - the browser simply doesn't provide access to the same kind of low-level networking primitives that a native OS does.
One potential way around this, though not a simple one, would be to re-implement the connection using a WebSocket, the in-browser equivalent of a socket. Perhaps by subclassing the ZK Class or similar?
Since this is not a PyScript-specific issue, I'm going to convert it to a Discussion.