importing OptionStream in windows envionment is throwing error "KeyError: 'HOME'
Describe the bug importing OptionStream in windows envionment is throwing error "KeyError: 'HOME' since "HOME" is used in default parameter of def get_secrets(filename=f'{os.environ["HOME"]}/.kite/secrets'):
Paste the code from expressoptionchain.option_stream import OptionStream
Expected behavior A clear and concise description of what you expected to happen.
Exceptions If applicable, add screenshots to help explain your problem.
Operating System windows
Additional context Add any other context about the problem here.
In helper.py , pls replace def get_secrets(filename=f'{os.environ["HOME"]}/.kite/secrets'): with def get_secrets(filename=None): if filename is None: home = os.environ.get("HOME") or os.path.expanduser("~") filename = f"{home}/.kite/secrets"
Thanks for the bug report. Until I fix it, please either pass the filename to get_secrets or set environment variable HOME.
Workaround 1: Set the HOME Environment Variable
In Command Prompt (cmd.exe):
set HOME=%USERPROFILE%
python your_script.py
Workaround 2: Pass the filename to get_secrets()
secrets = get_secrets(filename=secrets_path)