Cognex Dataman Connection and get img [python]

Its python3, im trying a lot of codes from forums, sending ASCII messages true socket inside camera, im getting replyes like Log in after sending login and password:
Socket Created
Socket Connected to example_ip on ip example_ip port 23
Username:
Password:
Login succeeded

but when im sending another comand im heting 25 thousand of ascii, when its not similar with dimensions to image.

I tried [Solved] Connecting Cognex to Halcon - Technical questions - RobotExchange -- python 3 code, but when im sending img like comand i cant get image.

I tried rewrite this code: Getting 1MB of ASCII Cognex image with Java sockets and TCP ZeroWindow issue to python but also without effect