gran4 / AI-InvestiBot

Innovative, high quality stock bot
MIT License
19 stars 7 forks source link

cant run implementation.py #91

Closed alexpvpmindustry closed 1 year ago

alexpvpmindustry commented 1 year ago

Describe the bug i ran the implementation.py after installing requirements.txt.

(.venv) C:\Users\aatan\Documents\Github\AI-InvestiBot>c:/Users/aatan/Documents/Github/AI-InvestiBot/.venv/Scripts/python.exe c:/Users/aatan/Documents/Github/AI-InvestiBot/AI-InvestiBot/implementation.py
Traceback (most recent call last):
  File "c:\Users\aatan\Documents\Github\AI-InvestiBot\AI-InvestiBot\implementation.py", line 300, in <module>
    models, total_info_keys = load_models(strategys=[RSI_indicators])
  File "c:\Users\aatan\Documents\Github\AI-InvestiBot\AI-InvestiBot\implementation.py", line 91, in load_models
    model = model_class(stock_symbol=company, information_keys=strategy)
  File "c:\Users\aatan\Documents\Github\AI-InvestiBot\AI-InvestiBot\models.py", line 842, in __init__
    super().__init__(start_date=start_date,
  File "c:\Users\aatan\Documents\Github\AI-InvestiBot\AI-InvestiBot\models.py", line 88, in __init__
    with open(f'Stocks/{stock_symbol}/dynamic_tuning.json', 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'Stocks/AAPL/dynamic_tuning.json'

To Reproduce

Expected behavior it should work.....??

What version of this library is it? latest

OS/Device + version windows 11, python3.10, vscode with venv installed with requirements.txt.

gran4 commented 1 year ago

Mistake number 1 So what is happening is that you have to save the models. Since I have not have them saved, it would to too large. Actually, there should be nothing in the Stocks folder. That is a mistake. So I will change that now.

What to do You can change model.py slightly to get this. Look inside the if name == "main": change the code to match each company. The list of companies is called company_symbols from trading_funcs.py.

You can change this manually, but I have not thought of making it easier to change.

alexpvpmindustry commented 1 year ago

Can u try to implement a minimal model or something for someone to start?

Doesn't have to be accurate or anything sensible.

This error doesn't inform me where or how to continue

I have tried changing the model to "rsi" but the similar error occurred

gran4 commented 1 year ago

What do you mean a minimal model? Oh, I think I know what you mean. I do want to add an option to do that, but I don't know how to add that yet without forcing everyone to download all the models. That would be way too large for people who just want to look at the project.

alexpvpmindustry commented 1 year ago

What I wanted to say is minimum working example... Right now I'm still getting simple syntax errors and missing definitions.

Let me know when u are done, I'll check back after...

Maybe I'll add a test in github actions to test... Its as simple as running "python implementation.py" in the github actions yml files. U will see those errors that I am seeing on my machine.

gran4 commented 1 year ago

Wait a bit

alexpvpmindustry commented 1 year ago

👍 thanks

gran4 commented 1 year ago

This sort of stuff is fixed in my new PR, but it will not be accurate because something is off with that. It is hard to tell what it is because it is not a hard error.

alexpvpmindustry commented 1 year ago

u can take a look at the errors that pop out on GA. image in this case, its because u didn't add the secrets into the GA secrets, they should show up as ***.

also, FYI, u can rerun the actions by clicking the recycle icon... (without needing for a new commit)

gran4 commented 1 year ago

Works as of: https://github.com/gran4/AI-InvestiBot/pull/96 even though the tests are still failing