_3S.CoDeSys.Core.Objects.InvalidProjectHandleException
Standard Error: The project handle 0 is invalid
Workaround:
When you do branch copy with checkout=False and then checkout the branch in a seperate line everything works. The issue seems to be that Codesys doesn't give back a proper handle when you do branch_copy with checkout=True.
This is mainly so that issue gets noted and resolved in a further Patch and that people with the same issue might have an easier time debugging their scripts.
With kind regards
Matthias Rudigier
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Since upgrading from V3.5 SP21 P3 to SP22 P3, this previously working scripted call fails:
project, current_branch = project.git.branch_copy(current_branch,new_branch_name,checkout=True)
Error:
_3S.CoDeSys.Core.Objects.InvalidProjectHandleException
Standard Error: The project handle 0 is invalid
Workaround:
When you do branch copy with checkout=False and then checkout the branch in a seperate line everything works. The issue seems to be that Codesys doesn't give back a proper handle when you do branch_copy with checkout=True.
This is mainly so that issue gets noted and resolved in a further Patch and that people with the same issue might have an easier time debugging their scripts.
With kind regards
Matthias Rudigier