You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I've hit the same error, and error is gone after git clean -fdx. This obviously related to #114247, I saw the same error message in CI fails on Windows. So, all you need to do - run git clean -fdx and then rebuild the interpreter.
Provided the magic has already been bumped since alpha 3, it doesn't need to be bumped again. Probably need to ask on #114247 though (at least to inform whoever made the change that they missed it, which ought to help them recognise in future when they need to increase the number).
Is it possible that @Eclips4 tested that branch at some point, possibly after the magic number update and before some other opcode changes? I just built before and after that change and didn't see any issue.
which prints this on terminal and show pop-up. After closing pop-up, the build is reported as successful, but running python.bat produces the same error.
I tried to clean the build
PCbuild\clean.bat -d -p x64
but it did not help.
I removed all *.pyc files, but it did not help either.
I created a new worktree, and the build was successful there.
Now, I see that PCbuild\clean.bat did not clear PCbuild\amd64 and PCbuild\obj. The remaining files:
Looks like you're getting x64 _freeze_module when it should be x86 by default, and if that's not rebuilding properly then you'll keep generating invalid bytecode from a previous build. I'm not sure how that would happen or how to reproduce it, but I can take a look through the cleanup code in case something jumps out.
If you have any ideas for anything else you might've done that's unusual, it might help. BTW, -e -p x64 are the default options for build.bat, so you only need to pass -d.
It was a single case. It is obvious that there is (was) a bug in the cleaning and rebuilding scripts, but the failure happens in rare circumstances, and it is not common for the workflow of other developers or bots.
I am closing this issue. If it will became enough reproducible and annoying, we can open a new issue. I cannot provide much useful info.
Activity
AlexWaygood commentedon Jan 25, 2024
I can't reproduce on my Windows machine -- what exact command did you run to get the Assertion failure?
Eclips4 commentedon Jan 25, 2024
Today I've hit the same error, and error is gone after
git clean -fdx. This obviously related to #114247, I saw the same error message in CI fails on Windows. So, all you need to do - rungit clean -fdxand then rebuild the interpreter.zooba commentedon Jan 25, 2024
Yeah, this tends to happen when the PYC magic needs to be updated but wasn't. Cleaning up old .pyc files usually fixes it.
terryjreedy commentedon Jan 25, 2024
I had same failure. Thanks for the fix, which worked for me also. Can this be closed? Does .pyc magic need bumping?
zooba commentedon Jan 25, 2024
Provided the magic has already been bumped since alpha 3, it doesn't need to be bumped again. Probably need to ask on #114247 though (at least to inform whoever made the change that they missed it, which ought to help them recognise in future when they need to increase the number).
AlexWaygood commentedon Jan 25, 2024
#114247 did bump the magic number
zooba commentedon Jan 25, 2024
Huh, that's fun then.
Is it possible that @Eclips4 tested that branch at some point, possibly after the magic number update and before some other opcode changes? I just built before and after that change and didn't see any issue.
Eclips4 commentedon Jan 25, 2024
You're right.
zooba commentedon Jan 25, 2024
Phew, that's a relief. It's a far better explanation than something else going wrong.
If @serhiy-storchaka can confirm the same, I suspect we can close this.
serhiy-storchaka commentedon Jan 25, 2024
I get this during building
which prints this on terminal and show pop-up. After closing pop-up, the build is reported as successful, but running
python.batproduces the same error.I tried to clean the build
but it did not help.
I removed all
*.pycfiles, but it did not help either.I created a new worktree, and the build was successful there.
Now, I see that
PCbuild\clean.batdid not clearPCbuild\amd64andPCbuild\obj. The remaining files:Details
Details
zooba commentedon Jan 25, 2024
Looks like you're getting x64
_freeze_modulewhen it should be x86 by default, and if that's not rebuilding properly then you'll keep generating invalid bytecode from a previous build. I'm not sure how that would happen or how to reproduce it, but I can take a look through the cleanup code in case something jumps out.If you have any ideas for anything else you might've done that's unusual, it might help. BTW,
-e -p x64are the default options for build.bat, so you only need to pass-d.serhiy-storchaka commentedon Jan 26, 2024
I did not do anything unusual. Few weeks ago I build it successfully, and now I just updated sources from GitHub and rebuild.
[-]Assertion failure on Windows[/-][+]Assertion failure in build on Windows[/+]terryjreedy commentedon Jan 27, 2024
There was definitely a recent anomaly. I have recompiled every few days for a year and a half (and a couple of days ago) without any problem.
Eclips4 commentedon Sep 23, 2024
Is this still happening?
serhiy-storchaka commentedon Sep 23, 2024
It was a single case. It is obvious that there is (was) a bug in the cleaning and rebuilding scripts, but the failure happens in rare circumstances, and it is not common for the workflow of other developers or bots.
I am closing this issue. If it will became enough reproducible and annoying, we can open a new issue. I cannot provide much useful info.