1hubert / genshin-dialogue-autoskip

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

Can't run program #27

Closed LightHillNess closed 11 months ago

LightHillNess commented 11 months ago

I installed everything from requirments.txt and when I try to run run.bat I get this

Welcome to Genshin Impact Dialogue Skipper

Traceback (most recent call last): File "D:\genshinskip\autoskip_dialogue.py", line 19, in if os.environ['WIDTH'] == '' or os.environ['HEIGHT'] == '':


  File "<frozen os>", line 685, in __getitem__
KeyError: 'WIDTH'
Press any key to continue . . .
1hubert commented 11 months ago

In theory, the program should auto-detect your resolution, ask you if it's correct, and save it in .env file.

Open the .env file with windows notepad and type in your monitor resolution like this:

WIDTH=1920
HEIGHT=1080

Hope that helps! Happy holidays!

LightHillNess commented 11 months ago

No this didn't help. Happy holidays!

1hubert commented 11 months ago

Try replacing line 19 with this: if os.getenv('WIDTH') == '' or os.getenv('HEIGHT') == '':

LightHillNess commented 11 months ago

image

1hubert commented 11 months ago

I get the same error after deleting my .env file. It has to be present in the same folder as autoskip_dialogue.py and run.bat. If you're sure it's there, then sorry, but I'm not able to reproduce your error and can't help you :(

LightHillNess commented 11 months ago

I fixed the problem when I downloaded the file it was env.txt changed it to .env now it works thanks

1hubert commented 11 months ago

That's great to hear!