Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DeniablePlausibility opened this issue Nov 27, 2022 · 7 comments

Comments

@DeniablePlausibility
Copy link

DeniablePlausibility commented Nov 27, 2022

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
Copy link
Author

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
Copy link
Author

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
Copy link

Lordfirespeed commented Jan 12, 2023

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
Copy link
Author

DeniablePlausibility commented Jan 15, 2023

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
Copy link

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
Copy link
Author

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
Copy link

reloxx13 commented Mar 13, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants