darkGrimoire / hoyolab-daily-bot

Genshin Impact's Hoyolab Daily Check-in Bot
MIT License
115 stars 44 forks source link

Error popup in Windows: Failed to execute script main_windows #20

Open DeniablePlausibility opened 1 year ago

DeniablePlausibility commented 1 year ago

Version 1.15 here, no problems (except with expired cookies, easily fixed), until today. I have not installed anything new in weeks.

Getting this error popup today and in the log file, no success/fail message is recorded after the line reporting that execution has started.

image

I've tried it several times and it's consistently failing.

Platform is Windows 10 Pro, version 22H2, OS build 19045.2251.

Python version: Python 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37)

DeniablePlausibility commented 1 year ago

Solved. I downloaded the source archive and ran main_windows.py manually in a shell, and it reported a missing package, browser_cookie3. Not sure why it went missing all of a sudden as I don't do any python development, but I installed it and the bot is running correctly again.

DeniablePlausibility commented 1 year ago

Reopening because today the error has returned. Running the main_windows.py script with the scheduler disabled works fine, no errors this time, it collected today's giveaway fine. Running the hoyolab_win_hidden.exe causes the popup to show up and no success/fail message in botlog.txt. Used pip to check the various packages and they seem fine.

Lordfirespeed commented 1 year ago

The executable has packages embedded into it. While the main_windows.py file will look in your python path for packages, the exe will not do that

DeniablePlausibility commented 1 year ago

Be that as it may, the error does occur despite that. I fixed it a couple of times through pip updates but now it is asking for MS Visual Code to be installed and that is just ridiculous. I have already given up on this and Python-based utilities in general, based on my experience with this utility.

Lordfirespeed commented 1 year ago

Do what you like. Python is a powerful scripting tool, suited for automations such as these. It's a shame it's a pain to compile it to a distributable executable easily. I've been doing some work on a fork of this repository, as a python-only (not compiled to exe) commandline tool, if you change your mind: Lordfirespeed/hoyolab-daily-bot

DeniablePlausibility commented 1 year ago

I appreciate that people are writing these things to help others, but when software keeps breaking for no easily apparent reason, it becomes an exercise in frustration. Thank you for your offer, but I already tried the plain script instead of the compiled executable and got the same result. I'm just going to take the path of least resistance and revert to doing this task by hand.

reloxx13 commented 1 year ago

Just happened to me randomly, too.

Using the hoyolabbot_win_hidden.exe as scheduled task.

The required packages should be included in the exe, why are they missing now?