Python debugging

Christoph B.
Muenster, NRW

Sep 16, 2024
5 Posts

0  |  0  

Re: Python debugging

is there any option to get the python traceback if an error occures?

Solution Available
John
Irvine, CA

Sep 16, 2024
13 Posts

1  |  0  

Re: Python debugging

Yes, you can.
Please see this post from stackoverflow:
https://stackoverflow.com/questions/1796510/accessing-a-python-traceback-from-the-c-api

The second most popular answer can be implemented in ATEasy.
In the Python Driver: Libraries>Python>Procedures; You will need to add PyErr_Fetch() and PyCallable_Check()in the DLL procedures:
----------------------------------------------------
Procedure PyErr_Fetch(): Void
exc:Var hPyObject
value:Var hPyObject
traceback:Var hPyObject

----------------------------------------------------
Procedure PyErr_Fetch(): Long
pstO: Val hPyObject




John



Please Note
You need to have a M@GIC account to participate in the Forums.
Not yet registered on our website? Click here to register today!

All content, information and opinions presented on the Marvin Test Solutions User Forums are those of the authors of the posts and messages and not Marvin Test Solutions'. All attachments and files are downloaded at your own risk. [Read More]