-
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
disable python "Caught the following exception:" window in Macro Development #85
Comments
Seems intentional... Found the behavior in https://github.com/klayoutmatthias/klayout/blob/master/src/lay/lay/layMacroEditorDialog.cc#L2804-L2816 Note: it seems you can disable it in a macro debug setup dialog cf. https://github.com/klayoutmatthias/klayout/blob/master/src/lay/lay/layMacroEditorDialog.cc#L1975 |
Thanks Thomas.
Interesting that it was designed this way, where other Python environments allow the code itself to deal with try/except cases, and don’t pop up GUIs.
It doesn’t look like the “config_set” method is exposed to Python, so perhaps we can't turn it off there?
dir(pya.Application.instance().main_window().instance())
['AllowNestedDocks', 'AllowTabbedDocks', 'AnimatedDocks', 'DockOption', 'DrawChildren', 'DrawWindowBackground', 'ForceTabbedDocks', 'IgnoreMask', 'QFlags_DockOption', 'QFlags_RenderFlag', 'RenderFlag', 'VerticalTabs', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattr__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_class_connect', '_class_disconnect', '_create', '_destroy', '_destroyed', '_inst_connect', '_inst_disconnect', '_is_const_object', '_manage', '_unmanage', 'acceptDrops', 'accessibleDescription', 'accessibleName', 'actions', 'activateWindow', 'addAction', 'addActions', 'addDockWidget', 'addToolBar', 'addToolBarBreak', 'adjustSize', 'animated', 'asConstQObject', 'asConstQPaintDevice', 'asQObject', 'asQPaintDevice', 'autoFillBackground', 'backgroundRole', 'backingStore', 'baseSize', 'blockSignals', 'cancel', 'centralWidget', 'childAt', 'children', 'childrenRect', 'childrenRegion', 'clearFocus', 'clearMask', 'clone_current_view', 'close', 'close_all', 'close_current_view', 'cm_adjust_origin', 'cm_bookmark_view', 'cm_cancel', 'cm_cell_copy', 'cm_cell_cut', 'cm_cell_delete', 'cm_cell_flatten', 'cm_cell_hide', 'cm_cell_paste', 'cm_cell_rename', 'cm_cell_select', 'cm_cell_show', 'cm_cell_show_all', 'cm_clear_layer', 'cm_clone', 'cm_close', 'cm_close_all', 'cm_copy', 'cm_copy_layer', 'cm_cut', 'cm_dec_max_hier', 'cm_delete', 'cm_delete_layer', 'cm_edit_layer', 'cm_exit', 'cm_goto_position', 'cm_help_about', 'cm_inc_max_hier', 'cm_last_display_state', 'cm_layout_props', 'cm_load_bookmarks', 'cm_load_layer_props', 'cm_lv_add_missing', 'cm_lv_delete', 'cm_lv_expand_all', 'cm_lv_group', 'cm_lv_hide', 'cm_lv_hide_all', 'cm_lv_insert', 'cm_lv_new_tab', 'cm_lv_regroup_by_datatype', 'cm_lv_regroup_by_index', 'cm_lv_regroup_by_layer', 'cm_lv_regroup_flatten', 'cm_lv_remove_tab', 'cm_lv_remove_unused', 'cm_lv_rename', 'cm_lv_rename_tab', 'cm_lv_select_all', 'cm_lv_show', 'cm_lv_show_all', 'cm_lv_show_only', 'cm_lv_sort_by_dli', 'cm_lv_sort_by_idl', 'cm_lv_sort_by_ild', 'cm_lv_sort_by_ldi', 'cm_lv_sort_by_name', 'cm_lv_source', 'cm_lv_ungroup', 'cm_macro_editor', 'cm_manage_bookmarks', 'cm_max_hier', 'cm_max_hier_0', 'cm_max_hier_1', 'cm_navigator_close', 'cm_navigator_freeze', 'cm_new_cell', 'cm_new_layer', 'cm_new_layout', 'cm_new_panel', 'cm_next_display_state', 'cm_open', 'cm_open_current_cell', 'cm_open_new_view', 'cm_open_too', 'cm_packages', 'cm_pan_down', 'cm_pan_left', 'cm_pan_right', 'cm_pan_up', 'cm_paste', 'cm_prev_display_state', 'cm_print', 'cm_pull_in', 'cm_reader_options', 'cm_redo', 'cm_redraw', 'cm_reload', 'cm_reset_window_state', 'cm_restore_session', 'cm_save', 'cm_save_all', 'cm_save_as', 'cm_save_bookmarks', 'cm_save_current_cell_as', 'cm_save_layer_props', 'cm_save_session', 'cm_screenshot', 'cm_sel_flip_x', 'cm_sel_flip_y', 'cm_sel_free_rot', 'cm_sel_move', 'cm_sel_move_to', 'cm_sel_rot_ccw', 'cm_sel_rot_cw', 'cm_sel_scale', 'cm_select_all', 'cm_select_cell', 'cm_select_current_cell', 'cm_setup', 'cm_show_properties', 'cm_technologies', 'cm_undo', 'cm_unselect_all', 'cm_view_log', 'cm_zoom_fit', 'cm_zoom_fit_sel', 'cm_zoom_in', 'cm_zoom_out', 'connect', 'contentsMargins', 'contentsRect', 'contextMenuPolicy', 'corner', 'create', 'createPopupMenu', 'createWinId', 'createWindowContainer', 'create_layout', 'create_view', 'current_view', 'current_view_index', 'cursor', 'customContextMenuRequested', 'customContextMenuRequested_', 'deleteLater', 'destroy', 'destroyed', 'destroyed_', 'disconnect', 'dockNestingEnabled', 'dockOptions', 'dockWidgetArea', 'documentMode', 'dumpObjectInfo', 'dumpObjectTree', 'dynamicPropertyNames', 'effectiveWinId', 'enable_edits', 'enabled', 'ensurePolished', 'event', 'eventFilter', 'exit', 'find', 'findChild', 'focus', 'focusPolicy', 'focusProxy', 'focusWidget', 'font', 'fontInfo', 'fontMetrics', 'foregroundRole', 'frameGeometry', 'frameSize', 'fullScreen', 'geometry', 'getContentsMargins', 'grab', 'grabGesture', 'grabKeyboard', 'grabMouse', 'grabShortcut', 'graphicsEffect', 'graphicsProxyWidget', 'grid_micron', 'hasFocus', 'hasHeightForWidth', 'hasMouseTracking', 'height', 'heightForWidth', 'hidden', 'hide', 'iconSize', 'iconSizeChanged', 'iconSizeChanged_', 'index_of', 'inherits', 'initial_technology', 'inputMethodHints', 'inputMethodQuery', 'insertAction', 'insertActions', 'insertToolBar', 'insertToolBarBreak', 'installEventFilter', 'instance', 'internalWinId', 'isActiveWindow', 'isAncestorOf', 'isAnimated', 'isDockNestingEnabled', 'isEnabled', 'isEnabledTo', 'isEnabledToTLW', 'isFullScreen', 'isHidden', 'isLeftToRight', 'isMaximized', 'isMinimized', 'isModal', 'isRightToLeft', 'isSeparator', 'isTopLevel', 'isVisible', 'isVisibleTo', 'isWidgetType', 'isWindow', 'isWindowModified', 'isWindowType', 'is_const_object', 'keyboardGrabber', 'killTimer', 'layout', 'layoutDirection', 'load_layout', 'locale', 'lower', 'manager', 'mapFrom', 'mapFromGlobal', 'mapFromParent', 'mapTo', 'mapToGlobal', 'mapToParent', 'mask', 'maximized', 'maximumHeight', 'maximumSize', 'maximumWidth', 'menu', 'menuBar', 'menuWidget', 'message', 'minimized', 'minimumHeight', 'minimumSize', 'minimumSizeHint', 'minimumWidth', 'modal', 'mouseGrabber', 'mouseTracking', 'move', 'moveToThread', 'nativeParentWidget', 'new', 'nextInFocusChain', 'normalGeometry', 'objectName', 'on_current_view_changed', 'on_view_closed', 'on_view_closed_', 'on_view_created', 'on_view_created_', 'overrideWindowFlags', 'overrideWindowState', 'paintEngine', 'palette', 'parent', 'parentWidget', 'pos', 'previousInFocusChain', 'property', 'qt_raise', 'rect', 'redraw', 'registerUserData', 'releaseKeyboard', 'releaseMouse', 'releaseShortcut', 'removeAction', 'removeDockWidget', 'removeEventFilter', 'removeToolBar', 'removeToolBarBreak', 'render', 'repaint', 'resize', 'restoreDockWidget', 'restoreGeometry', 'restoreState', 'restore_session', 'saveGeometry', 'saveState', 'save_session', 'scroll', 'select_view', 'setAcceptDrops', 'setAccessibleDescription', 'setAccessibleName', 'setAnimated', 'setAttribute', 'setAutoFillBackground', 'setBackgroundRole', 'setBaseSize', 'setCentralWidget', 'setContentsMargins', 'setContextMenuPolicy', 'setCorner', 'setCursor', 'setDisabled', 'setDockNestingEnabled', 'setDockOptions', 'setDocumentMode', 'setEnabled', 'setFixedHeight', 'setFixedSize', 'setFixedWidth', 'setFocus', 'setFocusPolicy', 'setFocusProxy', 'setFont', 'setForegroundRole', 'setGeometry', 'setGraphicsEffect', 'setHidden', 'setIconSize', 'setInputMethodHints', 'setLayout', 'setLayoutDirection', 'setLocale', 'setMask', 'setMaximumHeight', 'setMaximumSize', 'setMaximumWidth', 'setMenuBar', 'setMenuWidget', 'setMinimumHeight', 'setMinimumSize', 'setMinimumWidth', 'setMouseTracking', 'setObjectName', 'setPalette', 'setParent', 'setProperty', 'setShortcutAutoRepeat', 'setShortcutEnabled', 'setSizeIncrement', 'setSizePolicy', 'setStatusBar', 'setStatusTip', 'setStyle', 'setStyleSheet', 'setTabOrder', 'setTabPosition', 'setTabShape', 'setToolButtonStyle', 'setToolTip', 'setToolTipDuration', 'setUnifiedTitleAndToolBarOnMac', 'setUpdatesEnabled', 'setVisible', 'setWhatsThis', 'setWindowFilePath', 'setWindowFlags', 'setWindowIcon', 'setWindowIconText', 'setWindowModality', 'setWindowModified', 'setWindowOpacity', 'setWindowRole', 'setWindowState', 'setWindowTitle', 'show', 'showFullScreen', 'showMaximized', 'showMinimized', 'showNormal', 'signalsBlocked', 'size', 'sizeHint', 'sizeIncrement', 'sizePolicy', 'splitDockWidget', 'stackUnder', 'startTimer', 'staticMetaObject', 'statusBar', 'statusTip', 'style', 'styleSheet', 'synchroneous', 'synchronous', 'tabPosition', 'tabShape', 'tabifiedDockWidgets', 'tabifyDockWidget', 'takeCentralWidget', 'testAttribute', 'thread', 'toolBarArea', 'toolBarBreak', 'toolButtonStyle', 'toolButtonStyleChanged', 'toolButtonStyleChanged_', 'toolTip', 'toolTipDuration', 'topLevelWidget', 'tr', 'trUtf8', 'underMouse', 'ungrabGesture', 'unifiedTitleAndToolBarOnMac', 'unsetCursor', 'unsetLayoutDirection', 'unsetLocale', 'update', 'updateGeometry', 'updatesEnabled', 'view', 'views', 'visible', 'visibleRegion', 'whatsThis', 'width', 'winId', 'window', 'windowFilePath', 'windowFlags', 'windowHandle', 'windowIcon', 'windowIconChanged', 'windowIconChanged_', 'windowIconText', 'windowIconTextChanged', 'windowIconTextChanged_', 'windowModality', 'windowModified', 'windowOpacity', 'windowRole', 'windowState', 'windowTitle', 'windowTitleChanged', 'windowTitleChanged_', 'windowType', 'x', 'y']
|
This commit tries to address #85 and provide these features: - dynamic configuration of the macro IDE behaviour - side effect: a new entry in the setup dialog for the IDE settings - "stop on exceptions" can be taught to ignore certain files
Hi all, you can disable the "stop on exception" feature with this code:
But this flag is evaluated only when the macro IDE is started - hence it's not going to become efficient until you close and re-open the IDE. I have tried to implement a feature that allows "teaching" which files are to be ignore: the "stop on exceptions" button now has a "ignore" button. If this is used, the corresponding file is not longer considered. The list of ignored files can be cleared in the setup dialog. In addition, the configuration mentioned above will be dynamic. The commit is 5fbc207 Matthias |
Sorry, my fault. Should be fixed with 3ae71d7. |
Thanks. I thought I had caught that and it persisted. I will try again. Does it work fine for you with a fresh |
Hi @klayoutmatthias Sorry, it is still not fixed here. I rebuilt the entire |
Strange ... I tested with a new klayoutrc. Maybe your configuration file got corrupted. Could you try to delete ~/.klayout/klayoutrc?
Thanks,
Matthias
|
Ok that fixed the initial error. But now when I open klayout->Properties, I get an application crash handled by klayout. backtrace:
|
Hi Thomas, that's strange .. the fix should be unrelated to anything else. What "Properties" do you mean? I tried various ways to reproduce the issue but failed. I removed ~/.klayout and loaded a file. File/Layout Properties works as well as Edit/Properties, both in viewer or editor mode. Any hints? Thanks, Matthias |
Sorry. I meant Preferences. klayout -> Preferences. Or same bug trying to open the Macro Editor settings button. |
To reproduce: open klayout without anything loaded. then open the macro development editor. then click the cogwheel button to open the setup page. crash. |
Hmm ... thanks for the clarification. I reason that this issue is related to the change, but I tried hard and still could not reproduce it. I checked various potential missing initializers but without success. Even faithful valgrind did not report any particular issues here. If memory corruption causes non-reproducible behaviour, valgrind is usually able to find that. Also the stack trace is weird. The symbols seem to be messed up. Their sequence simply does not make sense. Either the stack trace symbols are wrong on MacOS or the symbol information inside the dylibs is bad. Maybe it's worth trying a full rebuild. Thanks and best regards, Matthias |
I'm sorry this is hard to reproduce. I have done that already. Didn't seem to go away. All I have confirmed is that commit 5fbc207 is the offending commit. I have reverted that and the program runs fine. I've tried qt 5.9.4 and qt 5.10, same result. Seems like I have to debug this one my own. Do you have tips for improving that backtrace somehow? Printing things to terminal? That would help. |
warnings while building on the
|
Just tried a fresh build again. This time in your master branch, commit 02c9c64 Attaching the build log. |
I figured it out by using old binary search debugging. Turns out you cannot give 0 as a pointer address. |
…: thanks for the root cause analysis)
Hi Thomas, many thanks for this solution. I understand perfectly now what's the problem. I'm still using Qt4 and Qt4's QSyntaxHighlighter allows the parent to be 0. Qt5 tries to dereference this pointer and the segfault happens. Too bad they modified their interface assumptions. Let me just modify your solution a little: actually the macro editor configuration page should be independent of the IDE itself, so the MacroEditorDialog may not be instantiated at the time the dialog page is used. The new patch is 1306229 Thanks a lot, Matthias |
Great! that fixed it. Does this solve Lukas's problem? Let me attach the build here (with qt5.10). I've added the file |
Hi @thomaslima I'm not sure if you are referring to the original issue I posted above, or the Qt issues... Old version (Feb, Python 2), showing the problems with Qt and keys: Here is what I see on SiEPIC-Tools using the version you uploaded (klayout-0.25.1-macOS-HighSierra-1-Qt5101-3295b63.dmg). Graphics are working great! Here is what I tested that is now working, i.e., you fixed:
http://www.youtube.com/watch?v=UbDsoy7h2es Thank you very much! |
Awesome! Good to know. Thanks for the videos. I am referring to the original issue about the exceptions being caught by the macro editor. I wonder if Matthias’s addition of an ignore button and an ignore list helps. |
Ah, very nice. The new “Ignore” button is nice, and I like the “Don’t stop inside these files”. I note that you can’t edit the list in the GUI, but I did find it in klayoutrc so that’s easy enough to edit if necessary.
|
Hi Lukas, Right now, you can just clear it :-) I felt that you would usually just fill the list by walking through your code and redoing this wasn't difficult. Matthias |
Here’s what I guess it’s happening. He wants some python modules to be shipped with SiEPIC. But because he can’t control the user’s python site packages, he just included the source code of these modules in the path of siepic. So he wanted their exceptions to not be caught from day zero for the user. Right now I’m working on shipping python and a site-packages folder inside klayout.app, so that you can install new packages to klayout with pip. I considered putting it in the .klayout folder but that might be unstable for the user during klayout upgrade. |
The exceptions actually are only a problem when developing. For the end user, when the Debug window is closed, the exceptions do not generate windows.
Thomas: interesting idea to allow users to have access to pip in a KLayout-compatible way.
|
I believe this issue can be closed. @lukasc-ubc check #100 ! |
* Use Qt 5 instead of Qt 4 Changelog: 0.25.3 (2018-05-03): * Enhancement: Compile option to use libcurl instead of QtNetwork This workaround enables builds on the native CentOS6 configuration with the package manager functional. * Enhancement: Pass label (text) layers through DRC script The "labels" method now allows copying labels from a layer to the output. * Enhancement: New "split" method for polygons This method will fragment the polygons into two or more smaller parts for reducing their vertex count. * Enhancement: New "dtrans" method for RecursiveShapeIterator This method delivers the transformation in micron unit space * Enhancement: New "insert" methods for Shapes Shapes can now insert from another Shapes container and from a RecursiveShapeIterator. Possible applications are fast flattening and fast region selection. * Enhancement: New method to generate RDB items from shapes RdbItem#add_value from a shape, RdbDatabase#create_items from a shapes container or recursive shape iterator and RdbDatabase#create_item from a shape. * Enhancement: DXF and CIF "keep layer names" If this option is set in the reader options, layer names are not translated into GDS layer/datatype pairs. Specifically a layer called "L5" for example is not translated to 5/0 and to "L5D0" on output correspondingly. The buddy script option is "--keep-layer-names". * Enhancement: DXF contour joining accuracy On the DXF reader's options, a contour joining accuracy can be specified. Small gaps smaller than this accuracy will be closed when forming joined contours from edges. The buddy script option is --dxf-contour-accuracy=value. * Bugfix: DXF display issue In some cases, DXF cell instances did not trigger bounding box update and the cells only got visible after save and load. * Bugfix: XOR progress is more realistic The progress is updated after the layer has been computed, not before. * Bugfix: KLayout/klayout#117 DTrans#itype was broken. * Bugfix: KLayout/klayout#116 Fixed a polygon decomposition bug when writing GDS files with big polygons with many holes. As a side effect, the polygons with many holes computed by a NOT operation for example are less complex and spikes in the cutlines are avoided. * Bugfix: KLayout/klayout#115 Reader options were not persisted. * Bugfix: KLayout/klayout#114 Custom line styles not loaded from tech's layer properties file. * Enhancement: KLayout/klayout#113 The XOR tool has an option now to heal result shapes which cross tile boundaries. The result shape count of tiled and non-tiled mode should basically be the same then. * Bugfix: KLayout/klayout#112 Salt package repository relative paths have not been working. * Bugfix: KLayout/klayout#109 Issues with Python 3 and shape properties - property * Bugfix: KLayout/klayout#108 Bugfix on Box#enlarge and Box#moved for empty boxes. keys generated with Python 3 could not be written to GDS2. * Bugfix: KLayout/klayout#107 Undo not working with shapes. * Enhancement: KLayout/klayout#106 Search & replace help page enhancements. 0.25.2 (2018-03-20): * Bugfix: KLayout/klayout#90 DRC: "extended" was not working as expected with "joined = true" * Bugfix: KLayout/klayout#89 Display issue on MacOS fixed * Enhancement: KLayout/klayout#85 IDE debugger: files can be excluded from showing exceptions when they are thrown. To exclude a file press the new "Ignore" button when the debugger tells you an exception has been generated. To re-able exception reporting, clear the list of the files in the IDE settings ("Debugging" tab) The macro IDE settings can now be edited in the File/Setup dialog. * Bugfix: KLayout/klayout#94 Retina displays are support to some extend on MacOS. An open topic is the quality of the icons. * Enhancement: build system for MacOS 0.25.1 (2018-02-23): * Enhancements: build compatibility with MacOS and Qt 5.9. Qt 4.6 supported now as well with one restriction: the package installation feature is not working. * Bugfixs: Package manager - Remove button wasn't enabled if multiple packages were selected - A potential crash ob removing packages was fixed * Enhancement: 64 bit coordinate support enabled on Windows builds * Further bugfixes: See links - KLayout/klayout#21 (Autorun(-early) doesn't seem to run when lym files are inside a package) - KLayout/klayout#24 (Text insert dialog bug - Ok button isn't working) - KLayout/klayout#26 (Exceptions are reported every time they propagate up in the call chain in the ruby debugger) - KLayout/klayout#28 (CIF format detection failed) - KLayout/klayout#30 (Writer options dialog non-functional on a fresh configuration) - KLayout/klayout#32 (Rounding issue with instance properties) - KLayout/klayout#33 (Plugin factory not working when using with Python) - KLayout/klayout#36 (Hardening against destruction of object inside event handler) - KLayout/klayout#39 (Action cannot be reassigned) - KLayout/klayout#40 (Crash in Python binding) - KLayout/klayout#41 (Polygon#touches? issue) - KLayout/klayout#42 (Headless mode support with Qt5/-zz) - KLayout/klayout#43 (Crash when using Qt specific command line options) - KLayout/klayout#44 (Transformation constructor with x,y not working) - KLayout/klayout#45 (Partial selection does not capture instance) - KLayout/klayout#48 (Cancel does not reset current tool) - KLayout/klayout#51 (Segmentation fault on return to main window and other opportunities) - KLayout/klayout#53 (Unreadable 'about' text) - KLayout/klayout#62 (QXmlSimpleReader#parse cannot be called) - KLayout/klayout#63 (Wrong output on DRC non_interacting with empty second input) - KLayout/klayout#64 (Crash on exit) - KLayout/klayout#68 (OASIS reader issue with degenerated shapes) - KLayout/klayout#69 (DRC: 'inside' does not merge shapes of second input) - KLayout/klayout#71 (Target cell argument is required) - KLayout/klayout#72 (Edges/Region NOT issue) - KLayout/klayout#73 (Allow 'change layers' on PCells which support a single layer parameter) - KLayout/klayout#74 (Small-corner boolean issue) - KLayout/klayout#75 (Python PCell issue when parameters are called 'layer') - KLayout/klayout#79 (Replace function enabled also for read-only macros) * Further enhancements: see links - KLayout/klayout#29 (Permissive mode for OASIS writer on odd-width paths) - KLayout/klayout#59 (Async download of package index and details) - KLayout/klayout#66 (Authentication dialog indicates retry) - KLayout/klayout#77 (Layout#copy_tree now works in non-editable mode too) 0.25 (2017-11-04): * Enhancement: Menu customization Menu items can be disabled or enabled now. The former "Key Bindings" configuration page has been turned into "Menu Customization". Check boxes allow enabling or disabling of menu items. Disabled menu items are not shown. A search filter allows quick selection of menu items by title or path. * Enhancement: The cell tree no longer is collapsed on edits or when the sorting order changes. * Enhancement: Using a special menu path, macros can be configured to appear in submenus now. * Enhancement: KLAYOUT_HOME environment variable to control the location of the application folder. The application folder is the place where KLayout keeps the configuration, macros, packages and other things. * Enhancements: Major overhaul of the build environment - Qt5 supported now - Employs qmake as build system - Reorganisation of the sources - Continuous integration enabled (unit tests integrated in .pro files, JUnit output etc.) - Compatible with the clang compiler * Enhancements: Buddy tools: KLayout now comes with a set of additional executables that provide some functionality subset in a lean way. These binaries are named "strm..." and are installed along with KLayout. - strm2cif: converts any format to CIF - strm2dxf: converts any format to DXF - strm2gds: converts any format to GDS2 - strm2gdstxt: converts any format to GDS2/text - strm2oas: converts any format to OASIS - strm2txt: converts any format to plain text (internally) - strmclip: creates a clip from a file - strmcmp: compares two files (logically) - strmxor: compares two files (geometrically) For more information, use the "-h" or "--help" option. * Enhancements: HTTPS support for loading files from URL's directly * Enhancements: Numerous enhancements and optimizations in the RBA/pya area and in the debugger. * Enhancements: KLayout notifies the user when a file was changed and asks whether to reload. * Enhancements: "File cell or layer": type into the cell or layer list to jump to the cell name typed. * Enhancements: Advanced search features in the filter entry box for the cell selection form: Case sensitive/insensitive, glob pattern, clear button. * Enhancements: Tree expansion icons have a better contrast now on Windows with dark background. * Enhancements: Forward and backward navigation buttons in the main window. These buttons jump to the previous or next display state: zoom window, hierarchy depth, etc.. * Enhancements: A Package manager is provided. Packages are add-ons for KLayout and can include macros, script libraries, fonts for the TEXT PCell, technologies, DRC scripts etc. Packages can be published on GitHub or any server supporting WebDAV. After registering a package, users can install or update packages with a few clicks. For more information see https://github.com/klayoutmatthias/klayout/wiki or "About Packages" in the "Various Topics" area of the main documentation. The package manager is found in the "Tools" menu under "Manage Packages". * Enhancements: LEF/DEF reader: - Compatibility fixes with version 5.8 - Regions and Groups are supported now - LEF/DEF is a standare format now and can be used with "File/Open" for example. * Enhancement: DXR reader supports variable path widths now * Enhancement: XOR provides graphical progress * Enhancements: Libraries can be associated with a technology. Only libraries associated with the selected technology are shown in the selection dialog. * Enhancements: Overlapping instances are easier to select now (instance selection cycling). * Enhancements: Many more methods in RBA/pya. For example: - Ability to directly insert "D" types (such as DBox into layouts and cells. - RBA::RecursiveShapeIterator now supports complex (non-rectangular) search regions - A more consistent type framework (consistent complex transformation types, vectors) - More intuitive interface in certain objects (i.e. CellView, LayerPropertiesNode, Annotation etc.). Changing an attribute usually has an immediate effect on the respective property now ("live objects") - Hash functions for certain objects - Box, Edge, Trans, Polygon, and other objects can be used as dictionary keys now. - New import methods for Region, EdgePairs and Edges - New features for LayerMapping and CellMapping - Multiple selected cells in LayoutView - RBA::TextGenerator to supply the Basic.TEXT PCell's functionality as static feature - Receivers can be added to signals and removed from signals now. - Individual instance iterator for CellInstArray - ... * Enhancements: Enhanced layout statistics form with detailed shape statistics. * Enhancements: Line styles (dashed, dotted etc.) available now. Works best with manhattan layouts. * Enhancements: "Marked box mode": boxes are drawn with a cross. * Enhancements: Arbitrary pattern size for custom fill pattern (no limited to multiples of 8). Max size is 32x32. Enhanced annotations: - Ellipses - Position markers - Text alignment - "Auto measure" rulers (place a ruler measuring the distances between adjacent objects with a single click) * Enhancements: DRC enhancements: - Text support - "smoothed" function - "layers" function delivers all layers read - Polygon with edge interactions - middle and extent_refs methods for center point and other references - "corners" function - "collect...", "select" and "each" methods * Enhancements: GDS2 paths can now use the MultiXY extension too. * Enhancements: X2 Support for Gerber import. * Enhancements: A function to reset the window state after the window has been misconfigured (i.e. detaching or closing the dockable windows). This feature is found in View/Restore Window.
Hi @klayoutmatthias,
This question is regarding handling try/except cases in python modules loaded in KLayout.
On MacOS (I haven't checked on Windows), when a module is within the KLayout python folder, e.g., urllib3 in ~/.klayout/python/urllib3, and when you run a macro that uses that module, with the Macro Development window open, each try/except creates exceptions which pop up a GUI:
However, if that module is installed in the system, e.g., pip install urllib3, then the same exceptions don't trigger the GUI.
And with the Macro Development window closed, you don't see these message and everything works fine.
What this means is that for modules that I develop and put in the KLayout path, I need to minimize the use of try/except, otherwise it makes debugging difficult (if you have to click "OK" 20 times before you get to the actual error you want to debug).
Is there any way to selectively disable the try/except dialogs for specific modules, or perhaps placing them in folders (salt/...) so they don't have these messages?
The text was updated successfully, but these errors were encountered: