IfcMerge: WSL (10) ERROR: CreateProcessEntryCommon:505: Create process not expected to return
Hi @brunopostle
I might be doing something wrong, but I get the following error anytime i submit a simple change.
It does seem to commit though.
video: https://community.osarch.org/uploads/editor/32/lvqkmmpfdzvk.mp4
bb 20240605
Python: Traceback (most recent call last):
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\blenderbim\bim\module\ifcgit\operator.py", line 134, in execute
core.commit_changes(tool.IfcGit, tool.Ifc, repo)
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\blenderbim\core\ifcgit.py", line 38, in commit_changes
ifcgit.git_commit(path_ifc)
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\blenderbim\tool\ifcgit.py", line 102, in git_commit
repo.index.commit(message=props.commit_message)
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\blenderbim\libs\site\packages\git\index\base.py", line 1163, in commit
run_commit_hook("post-commit", self)
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\blenderbim\libs\site\packages\git\index\fun.py", line 118, in run_commit_hook
raise HookExecutionError(hp, process.returncode, stderr, stdout)
git.exc.HookExecutionError: Hook('D:\Dropbox\Gitea_OD\Brookfield_Restaurant\.git\hooks\post-commit') failed due to: exit code(1)
cmdline: D:\Dropbox\Gitea_OD\Brookfield_Restaurant\.git\hooks\post-commit
stderr: '<3>WSL (10) ERROR: CreateProcessEntryCommon:502: execvpe /bin/bash failed 2
<3>WSL (10) ERROR: CreateProcessEntryCommon:505: Create process not expected to return
'
Comments
@theoryshaw it looks like it does the commit, then runs 'post commit hooks', where it tries to run a script using wsl, which seems odd, this fails because /bin/bash returns error code 1 (failure).
Do you have any commit hooks configured? It looks like you have wsl installed. Is it only this repository?
Thanks for the hint!
I went down a major rabbit hole, and still haven't figured it out...
Any other clues?
this is my post-commit file..
At the time, i did not manually install WSL. (I didn't even know what it was), but during my troubleshooting it looked like it was installed with a Desktop Docker I installed a while ago.
Since troubleshooting this problem, however, i have installed Ubuntu for windows and then installed WSL--but that didn't seem to help solve the problem.
Has this post-commit hook ever worked? I would expect it to only work in a Linux environment.
My best guess is that the #!/bin/sh line is forcing the script to be run by wsl (but I'm not familiar with wsl to say this is how it works), and it is failing - either because wsl doesn't have a Linux install, or the Linux installation doesn't have the necessary utilities (ie. git-lfs and git).
To see if it actually running, maybe temporarily change the
exit 2
toexit 0
. If the error goes away the script is definitely being run by a functional wsl Linux install.This is the first time i've really used the commit function in BB (i usually use TortoiseGit), so not sure if this has been an error for awhile.
...
I tried that, still got the following error...
The script will generate an error if this repo doesn't have LFS configured. Other than that I'm unsure, other than this is something to do with wsl.
When i commit, using TortoiseGIT, however I don't get this error message. Is there something with ifcmerge's that uses WSL to run git command, where TortoiseGIT goes not?
The Git functionality in BlenderBIM uses GitPython 'under the hood'. As far as I can tell, GitPython doesn't have any WSL specific behaviour.
Another guess would be that TortoiseGIT has its own /bin/sh interpreter to handle things like post-commit hooks, whereas BlenderBIM relies on the operating system, which in this case tries to run the script with WSL, and you are getting all these failures.
I just looked at your chatgpt sessions and it is actually giving you good advice. Have you tried the commit in BlenderBIM while the WSL ubuntu (where you installed git, git-lfs and git-crypt) is running?