'CertificateOptions' is not defined

Created at 09 Jan 2023, 15:47
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
CT

ctid402288

Joined 06.02.2016

'CertificateOptions' is not defined
09 Jan 2023, 15:47


While my code is trying to activate the Client with the following code:

client = Client(EndPoints.PROTOBUF_LIVE_HOST if self.endpoint == 'live' else EndPoints.PROTOBUF_DEMO_HOST, EndPoints.PROTOBUF_PORT, TcpProtocol)

The following error occurs while using the Python SDK:-

RuntimeError error: name 'CertificateOptions' is not defined

This appears to be emanating from ctrader_open_api.Client, is there additional things l need to do to avoid this error. Or is there a fix?

The code is running on Apple imac with Apple M1 processor, numpy 1.24.1 and protobuf 3.20.1. If anyone has come across this before, how you tackled it would assist me greatly. 


@ctid402288
Replies

ctid402288
09 Jan 2023, 15:55

The fix for this is to install OpenSSL

pip3 install pyOpenSSL


@ctid402288