Tk Source Code

View Ticket
Login
Ticket UUID: ef83a5d722fed6d4414198562e276da6c4ae0c24
Title: Mac OS X Tcl/Tk FilaDialog generates constraints issue
Type: Bug Version: 8.6.3
Submitter: anonymous Created on: 2014-11-26 17:30:27
Subsystem: 36. [tk_chooseDirectory] Assigned To: kevin_walzer
Priority: 3 Low Severity: Cosmetic
Status: Open Last Modified: 2015-02-13 02:58:38
Resolution: None Closed By: nobody
    Closed on:
Description:
Under the latest version of Mac OS X Yosemite, latest versions of python, with tcl 8.6.3 and with tcl 8.5.17.

Any use of python TkFileDialog.askdirectory results in this error message being generated  in the console.  

Similar errors are generated by all Tk Mac OSX built-in file/folder dialogs.

In python 2.7

2014-11-26 10:10:32.296 Python[1343:719253] Unable to simultaneously satisfy constraints:
(
    "<NSAutoresizingMaskLayoutConstraint:0x102d8dd10 h=--& v=--& V:[FI_TBrowserBackgroundView:0x108d3c910(0)]>",
    "<NSAutoresizingMaskLayoutConstraint:0x102d4bc30 h=-&- v=-&- V:|-(0)-[FI_TListScrollView:0x10038df80]   (Names: '|':FI_TBrowserBackgroundView:0x108d3c910 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x102d631f0 h=-&- v=-&- V:[FI_TListScrollView:0x10038df80]-(0)-|   (Names: '|':FI_TBrowserBackgroundView:0x108d3c910 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x10a01be10 h=-&- v=-&- V:[NSClipView:0x10038dbd0]-(15)-|   (Names: '|':FI_TListScrollView:0x10038df80 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x10a019bf0 h=-&- v=-&- V:|-(0)-[NSClipView:0x10038dbd0]   (Names: '|':FI_TListScrollView:0x10038df80 )>"
)


---

In python 3.4 

2014-11-26 10:11:13.459 Python[1351:722438] Unable to simultaneously satisfy constraints:
(
    "<NSAutoresizingMaskLayoutConstraint:0x101898e10 h=--& v=--& V:[FI_TBrowserBackgroundView:0x109c03e20(0)]>",
    "<NSAutoresizingMaskLayoutConstraint:0x101898820 h=-&- v=-&- V:|-(0)-[FI_TListScrollView:0x1004cb830]   (Names: '|':FI_TBrowserBackgroundView:0x109c03e20 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x1018987d0 h=-&- v=-&- V:[FI_TListScrollView:0x1004cb830]-(0)-|   (Names: '|':FI_TBrowserBackgroundView:0x109c03e20 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x1018931a0 h=-&- v=-&- V:[NSClipView:0x1004cb4a0]-(15)-|   (Names: '|':FI_TListScrollView:0x1004cb830 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x101893150 h=-&- v=-&- V:|-(0)-[NSClipView:0x1004cb4a0]   (Names: '|':FI_TListScrollView:0x1004cb830 )>"
)

Will attempt to recover by breaking constraint 
<NSAutoresizingMaskLayoutConstraint:0x1018931a0 h=-&- v=-&- V:[NSClipView:0x1004cb4a0]-(15)-|   (Names: '|':FI_TListScrollView:0x1004cb830 )>

Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens.  And/or, break on objc_exception_throw to catch this in the debugger.


---
python code as follows:

    localRoot = tkinter.Tk()
    localRoot.withdraw()
    fold_opt = {}
    fold_opt['parent'] = localRoot
    fold_opt['title'] = title
    fold_opt['initialdir'] = starting_folder
    fold_opt['initialfile'] = None
    foldpath = tkinter_filedialog.askdirectory(**fold_opt)
    localRoot.destroy()
    # localRoot.quit()                                                                                                          
    return foldpath


---

Googled it and basically found this error is caused by not properly setting constraints in your gui app.    Tracked it down to tk_8.6.3 but don't know enough about gui elements on Mac OS X to take it any further.
User Comments: kevin_walzer added on 2015-02-13 02:58:38:
Do these errors interfere with the app at all? They appear to be system-generated errors that are beyond our ability to address, and are often harmless.