MLTradingBot
MLTradingBot copied to clipboard
when i run the code i encounter many exceptions...
So whenever i run the file i encounter many exceptions and then the code does not work. Below is what i get when i run this script.
2024-09-20 18:14:55 | lumibot.credentials | INFO | .env file loaded from: C:\Users\mrhac\Desktop\Tanmay\MLTradingBot-main.venv\Scripts.env
C:\Users\mrhac\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\tokenization_utils_base.py:1601: FutureWarning: clean_up_tokenization_spaces
was not set. It will be set to True
by default. This behavior will be depracted in transformers v4.45, and will be then set to False
by default. For more details check this issue: https://github.com/huggingface/transformers/issues/31884
warnings.warn(
2024-09-20 18:15:00 | asyncio | INFO | [unknown] Waiting for the socket stream connection to be established,
method _stream_established must be called
2024-09-20 18:15:00 | alpaca.trading.stream | INFO | started trading stream
2024-09-20 18:15:00 | alpaca.trading.stream | INFO | starting trading websocket connection
Traceback (most recent call last):
File "C:\Users\mrhac\AppData\Local\Programs\Python\Python310\lib\site-packages\alpaca\common\rest.py", line 196, in _one_request
response.raise_for_status()
File "C:\Users\mrhac\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://paper-api.alpaca.markets/v2/account
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\mrhac\Desktop\Tanmay\MLTradingBot-main\tradingbot.py", line 83, in
Can anyone give me a fix to this issue??