The article describes an example of creating a class for working with the trade server return codes and all the errors that occur during the MQL-program run. Read the article, and you will learn how to work with classes and objects in MQL5. At the same time, this is a convenient tool for handling errors; and you can further change this tool according to your specific needs.
I'm running Python from Anaconda shell to connect to Metatrader 5:
It opens the MT5 terminal and logs in but never gets a successful return value. It hangs for the timeout duration and then times out:
failed to connect at account #935240, error code: (-10005, 'IPC timeout')
Why would this happen?