How to solve "TypeError: unsupported format string passed to OSError.__format__"?

266 Views Asked by At

I call in this module into my code, however it causes an error which I do not understand or know how to fix.

Here is the code:

except socket.error as e:
        print('SCPI >> connect({:s}:{:d}) failed: {:s}'.format(host, port, e))

And here is the error:

 File "C:\Users\dweisskopf\Downloads\redpitaya_scpi.py", line 29, in __init__
print('SCPI >> connect({:s}:{:d}) failed: {:s}'.format(host, port, e))

TypeError: unsupported format string passed to OSError.__format__

Please help.

Thank you!

0

There are 0 best solutions below