I am working on a project in which we link Aspen Plus to Python, so we can apply a reinforcement learning agent to design and optimize a separation train. Meanwhile a lot of errors have been fixed, but currently I am stuc on the following error: pywintypes.com_error: (-2147352567, 'Exception occurred.', (1, 'Aspen.Unknown', 'No message available', None, 0, 0), None)
I tried to use a try and except statement to intercept this error, but com_errors are not interceptable in regular except statements. Online I found solutions which use the following statement:
try:
...
except pythoncom.com_error:
...
This statement does not seem to work for me, since I get a warning: Cannot find reference 'com_error' in 'pythoncom.py'
Does anyone has an idea to solve this? Help is much appreciated! enter image description here