-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python error messages should include more information #1237
Comments
@simonwaid maybe the debugging mode is not enabled in your case? |
Even outside the debugger, the message should be detailed as shown above. Either that request refers to an older version or the mentioned behaviour is specific to a certain use case. Specifically during PCell code execution, error messages are handled differently. But I cannot imagine syntax errors happen in that phase - you need to load code before the PCell gets executed. And syntax errors should be seen during that phase already. Matthias |
@simonwaid Thanks for these pointers. The problem seems to be related to Python 3.10.6 which is default on Ubuntu. With the 3.8.10 version I am using for my own builds on Ubuntu 22, everything works as expected: This will give me enough pointers to debugging. Apart from that you don't need to use the XML format. You can use plain text files too (chose "Plain Python file" for the macro template). KLayout will add some pseudo-comments at the beginning to mark such files for auto-execution on startup. Some users reported to have used KLayout within PyCharm by configuring KLayout as the Python interpreter. I'm not a regular PyCharm user myself, so I cannot give more details as of now. Matthias |
I'm trying to write a PCell using the integrated editor.
Of course I make mistakes. From other development tools (eclipse with PyDev) I'm used to get error messages from python that point me the location of the mistake.
In Klayout I get error messages such as:
No information about which line is affected. It is very, very painful to debug code like that.
The text was updated successfully, but these errors were encountered: