1hubert / genshin-dialogue-autoskip

A simple python script to automatically skip dialogue in Genshin Impact
MIT License
63 stars 23 forks source link

need help w the screen resolution part #20

Closed 8baozhou closed 1 year ago

8baozhou commented 1 year ago

it says this and im not sure how to fix it, this is the only part im struggling ;-;

if os.environ['WIDTH'] == '' or os.environ['HEIGHT'] == '':


  File "frozen os", line 679, in __getitem__
KeyError: 'WIDTH'
1hubert commented 1 year ago

How does your .env file looks like? You can open it with notepad or other text editors.

8baozhou commented 1 year ago

How does your .env file looks like? You can open it with notepad or other text editors.

i tried to manually input like this:

WIDTH=1920 HEIGHT=1080

it says the same error anyway

1hubert commented 1 year ago

are you sure you have python-dotenv installed? if you're not sure, do the following:

1) click the windows button on your keyboard 2) type cmd and confirm with enter 3) run pip install python-dotenv (that will install a package for loading variables from .env file)

8baozhou commented 1 year ago

yep downloaded all the extensions

1hubert commented 1 year ago

i've just noticed that i forgot to include python-dotenv in the requirements.txt file (updated it just now)

if you already have all of that downloaded, then i'm sorry but i'm not sure how to help you. i can't seem to reproduce the error on my end.

you could try using other method for checking if .env needs an update, for example: line 19: if os.getenv('WIDTH') == '' or os.getenv('HEIGHT') == '':