Getting ValueError: expected "ok" or "error" result, but received error while running Mainframe automation

Hello Team,

I am running mainframe script on my Macbook pro. Now when I am running the script, I am getting the error ValueError: expected “ok” or “error” result, but received.

I have already installed x3270 and it is set in path.