Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can your project run on macOS? (self solved) #9

Open
B3ndek opened this issue Nov 19, 2023 · 1 comment
Open

Can your project run on macOS? (self solved) #9

B3ndek opened this issue Nov 19, 2023 · 1 comment

Comments

@B3ndek
Copy link

B3ndek commented Nov 19, 2023

Hi there! I've been getting an error while trying to run your project on my old MacBook Air A1466 (Intel CPU).

Code:

from API import XTB

login = xxxxxxx (7 digits, without quotes - on Windows PC it works even when login is in quotes)
haslo = "mypassword"
API = XTB(ID=login, PSW=haslo)
list = API.get_Candles("M1", "AUDUSD", qty_candles=10)
API.logout()

Error:

File "/Users/xxxxxxx/PycharmProjects/FX/API.py", line 573, in send
self.ws.send(msg)
^^^^^^^^^^^^
AttributeError: 'int' object has no attribute 'send'

It works perfectly on 3 different Windows laptops. Any ideas on what might be an issue?

@B3ndek
Copy link
Author

B3ndek commented Mar 26, 2024

Got it. Seems like my error was due to a common SSL certificate verification issue on macOS when using Python. This happens because Python on macOS might not be able to locate or trust the root certificates that verify the SSL connection's authenticity.

How to fix that:
Locate the Install Certificates.command. This script should be included with your Python installation likely in the Applications/Python folder.

@B3ndek B3ndek changed the title Can your project run on macOS? Can your project run on macOS? (self solved) Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant