Skip to main content
Participant
September 14, 2023
Question

python API - cannot close after save because project is locked

  • September 14, 2023
  • 0 replies
  • 328 views

Hello,

 

I have a problem when trying to close a project in a script, related to the fact that the project seems to be locked (there is indeed a .painter_lock file):

 

[Python] File "C:\Users/Fabien/OneDrive/Documents/Adobe/Adobe Substance 3D Painter/python\plugins\sbs_automation.py", line 468, in __call__
substance_painter.project.close()

 

[Python] File "C:\Program Files/Adobe/Adobe Substance 3D Painter/resources/python/modules\substance_painter\project.py", line 382, in close
_substance_painter.project.do_action(_substance_painter.project.Action.Lock)

 

[Python] _substance_painter.exception.ProjectError: Cannot do 'Lock' action from current 'Project locked' state

 

I cannot find a workaround to this problem, because even if a watch the exception, it seems that there is no event or operation related to locked status of the project.

Has anybody a solution to this problem ?

 

Thank you for your help

 

This topic has been closed for replies.