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
I'm trying to use python-snap7 2.0.2 on a 32-Bit python (tried 3.9 and 3.11).
When I try to start the server with
python -m snap7.server
I get:
[INFO]: creating server
[INFO]: setting event callback
[INFO]: registering area 5, index 1, size 100
[INFO]: registering area 1, index 1, size 100
[INFO]: registering area 4, index 1, size 100
[INFO]: registering area 3, index 1, size 100
[INFO]: initialising with standard values
[INFO]: registering area 5, index 0, size 976
[INFO]: setting server TCP port to 1102
[INFO]: starting server on 0.0.0.0:1102
[INFO]: callback event: 2025-12-02 07:43:56 Server started
[INFO]: callback event: 2025-12-02 07:43:56 Server started
[ERROR]: b' TCP : Other Socket error (22)'
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\workspace\tools\Python312-32\Lib\site-packages\snap7\server\__main__.py", line 54, in <module>
main()
File "C:\workspace\tools\Python312-32\Lib\site-packages\click\core.py", line 1161, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\workspace\tools\Python312-32\Lib\site-packages\click\core.py", line 1082, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\workspace\tools\Python312-32\Lib\site-packages\click\core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\workspace\tools\Python312-32\Lib\site-packages\click\core.py", line 788, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\workspace\tools\Python312-32\Lib\site-packages\snap7\server\__main__.py", line 50, in main
mainloop(port, init_standard_values=True)
File "C:\workspace\tools\Python312-32\Lib\site-packages\snap7\server\__init__.py", line 405, in mainloop
server.start(tcp_port=tcp_port)
File "C:\workspace\tools\Python312-32\Lib\site-packages\snap7\error.py", line 121, in inner
check_error(code, context=context)
File "C:\workspace\tools\Python312-32\Lib\site-packages\snap7\error.py", line 143, in check_error
raise RuntimeError(error)
RuntimeError: b' TCP : Other Socket error (22)'
[INFO]: destroying server
When I try the same with 64-Bit python, it works:
[INFO]: creating server
[INFO]: setting event callback
[INFO]: registering area 5, index 1, size 100
[INFO]: registering area 1, index 1, size 100
[INFO]: registering area 4, index 1, size 100
[INFO]: registering area 3, index 1, size 100
[INFO]: initialising with standard values
[INFO]: registering area 5, index 0, size 976
[INFO]: setting server TCP port to 1102
[INFO]: starting server on 0.0.0.0:1102
[INFO]: callback event: 2025-12-02 07:34:16 Server started
[INFO]: callback event: 2025-12-02 07:34:16 Server started
[INFO]: 2025-12-02 07:34:16 Server started
The point is, we have software where we need to use the 32-Bit version.
Does somebody know what do to or adapt?
It even looks more like that this is a bug in the C-Library, not the python code?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to use python-snap7 2.0.2 on a 32-Bit python (tried 3.9 and 3.11).
When I try to start the server with
python -m snap7.serverI get:
When I try the same with 64-Bit python, it works:
The point is, we have software where we need to use the 32-Bit version.
Does somebody know what do to or adapt?
It even looks more like that this is a bug in the C-Library, not the python code?
Beta Was this translation helpful? Give feedback.
All reactions