[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-26 Thread lance robotson


lance robotson  added the comment:

This issue is happening for me in with my installation of python 3.10 running 
the release version of mac os monterey 12.0.1 running on an intel mac, I 
noticed this behavior trying to open or save files in IDLE.

--
nosy: +robotson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Guy DeStefano


Guy DeStefano  added the comment:

I appreciate the information, In the future I will do as is stated.  Thanks
for the reply.
Guy DeStefano

On Mon, Oct 11, 2021 at 2:24 PM Ned Deily  wrote:

>
> Ned Deily  added the comment:
>
> @Guy, thanks for your interest but in the future please don't use the
> issue tracker as a help forum. There are lots of places to ask about such
> matters; https://www.python.org/about/help/ has a good list of resources
> and, among the Python-specific mailing lists at
> https://www.python.org/about/help/, there are ones specifically for
> Python usage on macOS (
> https://mail.python.org/mailman/listinfo/pythonmac-sig) and Tkinter usage
> (https://mail.python.org/mailman/listinfo/tkinter-discuss).
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Ned Deily


Ned Deily  added the comment:

@Guy, thanks for your interest but in the future please don't use the issue 
tracker as a help forum. There are lots of places to ask about such matters; 
https://www.python.org/about/help/ has a good list of resources and, among the 
Python-specific mailing lists at https://www.python.org/about/help/, there are 
ones specifically for Python usage on macOS 
(https://mail.python.org/mailman/listinfo/pythonmac-sig) and Tkinter usage 
(https://mail.python.org/mailman/listinfo/tkinter-discuss).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Guy DeStefano


Guy DeStefano  added the comment:

Thank you very much for the reply. Sorry for previous text.
Guy DeStefano

On Mon, Oct 11, 2021 at 2:10 PM Marc Culler  wrote:

>
> Marc Culler  added the comment:
>
> No, Apple is not going to do away with their NSOpenPanel.  There is always
> some churn when they release a new OS.  Subtle changes to APIs can occur
> with no warning and no documentation.  Sometimes they are bugs. Sometimes
> they disappear when the OS is released.  Sometimes they are permanent.  I
> would not recommend using a beta version of the OS to develop your tkinter
> app.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Guy DeStefano


Guy DeStefano  added the comment:

Thank you very
Guy DeStefano

On Mon, Oct 11, 2021 at 2:10 PM Marc Culler  wrote:

>
> Marc Culler  added the comment:
>
> No, Apple is not going to do away with their NSOpenPanel.  There is always
> some churn when they release a new OS.  Subtle changes to APIs can occur
> with no warning and no documentation.  Sometimes they are bugs. Sometimes
> they disappear when the OS is released.  Sometimes they are permanent.  I
> would not recommend using a beta version of the OS to develop your tkinter
> app.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Marc Culler


Marc Culler  added the comment:

No, Apple is not going to do away with their NSOpenPanel.  There is always some 
churn when they release a new OS.  Subtle changes to APIs can occur with no 
warning and no documentation.  Sometimes they are bugs. Sometimes they 
disappear when the OS is released.  Sometimes they are permanent.  I would not 
recommend using a beta version of the OS to develop your tkinter app.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Guy DeStefano


Guy DeStefano  added the comment:

Please help me.  Am new to Python, and don't know enough to post here, but I 
will try.  Have written a couple of programs that use tkinter, especially 
tkinter.filedialog.askopenfilenames, and as everyone else mine has quit working 
since Monterey. I have a macOS Monterey version beta( 21A5543b ).  Am 
using Python3 v3.10.0.  Have tried using v3.11.0a1, but could not even compile, 
says that import ( PIL ) does not exist.  Put back v 3.10.0 and am back to no 
filedialog.  Is Apple attempting to do away with the file API.  Just asking. 
Thank you.

--
nosy: +guydestefano
versions:  -Python 3.11, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Marc Culler


Marc Culler  added the comment:

Hi Ronald,
There is no calendar scheduling for Tk releases.  Don Porter decides when they 
happen.  But I think we are due for another one soonish.  In case it doesn't 
happen before the next Python release I will attach the patch file for commit 
a32262e9.  (Note that this is subject to change - I still need to test on 
10.14.) I believe that this patch is completely self-contained and can be 
applied to the 8.6.11 release.

(Hint: Tk uses fossil as its SCM system.  On a fossil timeline, clicking any 
two nodes generates their diff.  The Tk timeline is at 
https://core.tcl-lang.org/tk/timeline)

--
keywords: +patch
Added file: https://bugs.python.org/file50343/openfile.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-11 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Marc, thanks for the update.

Will there be a Tcl/Tk release soonish that includes this fix? 

Alternatively, is there patch that we can apply to the latest release when 
building the copy of Tk included with the installers?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-10 Thread Marc Culler


Marc Culler  added the comment:

I was able to fix this problem for Tk on Monterey beta [21A5543b].
The fix has been committed to the tip of the core-8-6-branch in the
Tk fossil repository.

Here is a synopsis.  Tk used to open the file dialog by calling
[NSApp runModalForWindow:panel].  Starting with the release of 10.14
this call would produce a warning message on stderr saying that
[NSOpenPanel runModal] should be used instead.  But on systems older
than 10.14, the runModal method would fail because the completion handler
would not get called.  Now, with 12.0 (at least in the beta) calling
[NSOpenPanel runModal] produces an error dialog saying "The open file
operation failed to connect to the open and save panel service" and
this would be accompanied by a traceback printed on stderr for an
assertion error.  (It was not a "crash" but the file selection would
fail.)  However, it turns out that calling [NSApp runModalForWindow:panel]
no longer produces the warning in 12.0, and it works correctly.

So my workaround was to add conditional code that only calls the runModal
method on 10.14 and 10.15 and calls runModalForWindow on other versions
of macOS.  I tested on 10.15 and it works there as well.

Needless to say, none of these changes are documented by Apple.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-10 Thread Marc Culler


Marc Culler  added the comment:

Unfortunately, I am still seeing this failure in Monterey beta 9.  However, we 
are no longer alone.  Here is a report of the same issue in Android Studio:

https://stackoverflow.com/questions/69068842/android-studio-open-file-operation-failed-the-open-file-operation-failed-to-co

This is reportedly fixed in the Adroid Studio beta, so maybe someone will be 
able to figure out what Google did to workaround the problem.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-10-01 Thread David Melgar


David Melgar  added the comment:

Same issue. Running Monterey beta. Experiencing crash.

Is there any plan for a fix or is the plan to wait for Monterey to release?

--
nosy: +enki1711

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-09-06 Thread Fahim Faisal


Fahim Faisal  added the comment:

Can also confirm this issue, tested on M1 and Intel Mac and both has the same 
error when using Monterey 12.0 Beta 21A5506j. 

On the same computer, using Big Sur, saves the file successfully and no error 
present. Seems like a Monterey issue, not dependent on specific hardware. 
(Intel/M1)

Tested on fresh Python 3.9.6 (tk version 8.6) Installation on Big Sur and 
Monterey Beta (Build 21A5506j) on a M1 Macbook Pro and Early 2015 13" Macbook 
Pro.

--
nosy: +i3p9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-08-29 Thread Mark Lierley

Mark Lierley  added the comment:

I am also experiencing this issue.

I have an M1 Macbook Air running MaOS Monterey Version 12.0 Beta (21A5304g) 
with a fresh install of Python 3.9.6. 

When attempting to save or open anything from either the editor or console 
window I get the following error message "The Save file operation failed. The 
save file operation failed to connect to the open and save panel service.”

I have granted the IDEL full drive access which hasn't resolved the issue. The 
dialog prevents any savings from occurring making the IDEL useless. 

I have submitted this issue through Apple's Feedback tool as well.

--
nosy: +mlierley
Added file: https://bugs.python.org/file50244/Screen Shot 2021-08-29 at 7.44.33 
PM.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-08-06 Thread Ned Deily


Ned Deily  added the comment:

Thanks for looking into this, Marc.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-08-06 Thread Marc Culler


Marc Culler  added the comment:

I should have mentioned that I tested on Intel hardware, not M1.  I do not have 
access to an M1 Apple at this time.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-08-06 Thread Marc Culler

Marc Culler  added the comment:

I built Tcl and Tk 8.6 on Monterey beta (21A5294g) and I see this
traceback in the Wish file dialog demo.  Note that this is *not* an
error.  The file dialog works fine.  This is a non-fatal
NSInternalInconsistencyException which prints a traceback to stderr.
It occurs within a call to [NSSavePanel runModal] which is entirely
Apple code.  The runModal method is not deprecated.  Most likely, when
Apple releases Monterey the assert command will have been removed,
possibly replaced by a call to NSLog which writes information into a
log file rather than print it to stderr.  (NSLog itself prints to
stderr when debugging is enabled.)  Of course macOS apps run without
stderr, so you will only see this traceback when running a python
program from the terminal.  (Any linux user who runs linux apps from
the terminal is used to seeing lots of stderr messages in stderr.  Try
running okular from a terminal sometime.  So we shouldn't complain too
much.)

Anyway, this looks harmless and the messages will almost surely go
away in the production version.  However, there are several new
deprecations related to specifying preferred file types in a file
dialog which I will address in Tk before Monterey is released.

Beta releases are betas, even for macOS.

- Marc

On Thu, Aug 5, 2021 at 1:23 PM Ned Deily  wrote:
>
>
> Ned Deily  added the comment:
>
> > I used brew.sh to install Python, which I think uses the universal installer
>
> As far as I know, Homebrew builds its own Python and Tk.
>
> > After I reinstall macOS, if you need further testing, i’m open to trying.
>
> Thanks. I think the next step would be to try to reproduce just using Tcl and 
> Tk as this most likely is an issue in Tk rather than Python.  It's also quite 
> possible that the underlying problem will be fixed in a future Monterey beta. 
> Alas, I don't have time to look further into this in the immediate future.  
> Perhaps someone can follow up directly with the Tk folks.
>
> --
> nosy: +culler
>
> ___
> Python tracker 
> 
> ___

--
nosy: +Marc.Culler

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-08-05 Thread Ned Deily

Ned Deily  added the comment:

> I used brew.sh to install Python, which I think uses the universal installer

As far as I know, Homebrew builds its own Python and Tk.

> After I reinstall macOS, if you need further testing, i’m open to trying.

Thanks. I think the next step would be to try to reproduce just using Tcl and 
Tk as this most likely is an issue in Tk rather than Python.  It's also quite 
possible that the underlying problem will be fixed in a future Monterey beta. 
Alas, I don't have time to look further into this in the immediate future.  
Perhaps someone can follow up directly with the Tk folks.

--
nosy: +culler

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-08-05 Thread Nythepegasus

Nythepegasus  added the comment:

I used brew.sh to install Python, which I think uses the universal installer 
(although I can’t check, reinstalling macOS after hours of failing to downgrade 
back to Big Sur). I can’t remember the exact error, but it seemed to be from 
Apple’s end since it complained about not having access to the save/open dialog 
box. After I reinstall macOS, if you need further testing, i’m open to trying.
On Aug 4, 2021, 2:53 PM -0400, E. Paine , wrote:
>
> E. Paine  added the comment:
>
> Thanks for reporting issue and for including the backtrace. I presume you 
> used the Universal 2 installer, given that you are running an M1 mac?
>
> Kevin, do you have access to the macOS 12 beta to help test whether this is a 
> Tkinter or Tk bug? (I assume the latter, as it is likely Apple have changed 
> the API again)
>
> --
> components: +macOS
> nosy: +epaine, ned.deily, ronaldoussoren, serhiy.storchaka, wordtech
>
> ___
> Python tracker 
> 
> ___

--
title: Using tkinter.filedialog crashes on macOS 12 Monterey beta 4 with 
tk8.6.11 from python.org installers -> Using tkinter.filedialog crashes on 
macOS Python 3.9.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-08-04 Thread E. Paine


E. Paine  added the comment:

Thanks for reporting issue and for including the backtrace. I presume you used 
the Universal 2 installer, given that you are running an M1 mac? 

Kevin, do you have access to the macOS 12 beta to help test whether this is a 
Tkinter or Tk bug? (I assume the latter, as it is likely Apple have changed the 
API again)

--
components: +macOS
nosy: +epaine, ned.deily, ronaldoussoren, serhiy.storchaka, wordtech

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-08-04 Thread Nythepegasus


New submission from Nythepegasus :

Using tkinter.filedialog crashes on macOS 12.0 Beta (21A5294g) on M1 when the 
open file dialog window is created. Full crash below:

2021-08-04 07:19:04.239 Python[40251:323363] *** Assertion failure in 
-[NSOpenPanel beginServicePanel:asyncExHandler:], NSVBOpenAndSavePanels.m:1910
2021-08-04 07:19:04.241 Python[40251:323363] -[NSSavePanel 
beginWithCompletionHandler:]_block_invoke caught non-fatal 
NSInternalInconsistencyException ' is attempting to 
advance this Open/Save panel to run phase while another 
self.advanceToRunPhaseCompletionHandler is in waiting for a previous attempt. 
An Open/Save panel cannot start to advance more than once.' with user 
dictionary {
NSAssertFile = "NSVBOpenAndSavePanels.m";
NSAssertLine = 1910;
} and backtrace (
0   CoreFoundation  0x0001a9d47150 
__exceptionPreprocess + 240
1   libobjc.A.dylib 0x0001a9a986e8 
objc_exception_throw + 60
2   Foundation  0x0001aac3b4a4 
-[NSCalendarDate initWithCoder:] + 0
3   AppKit  0x0001ad1f02b0 
-[NSSavePanel beginServicePanel:asyncExHandler:] + 512
4   AppKit  0x0001ad1f1708 
-[NSSavePanel runModal] + 332
5   libtk8.6.dylib  0x0001013d8c18 
showOpenSavePanel + 360
6   libtk8.6.dylib  0x0001013d99e4 
Tk_ChooseDirectoryObjCmd + 992
7   libtcl8.6.dylib 0x0001011cbafc 
TclNRRunCallbacks + 80
8   _tkinter.cpython-39-darwin.so   0x000100c111a4 Tkapp_Call + 
400
9   Python  0x000100d66a40 
cfunction_call + 96
10  Python  0x000100d184e0 
_PyObject_Call + 128
11  Python  0x000100e10150 
_PyEval_EvalFrameDefault + 40288
12  Python  0x000100e053f0 
_PyEval_EvalCode + 444
13  Python  0x000100d1877c 
_PyFunction_Vectorcall + 364
14  Python  0x000100e12590 
call_function + 128
15  Python  0x000100e0ff08 
_PyEval_EvalFrameDefault + 39704
16  Python  0x000100e053f0 
_PyEval_EvalCode + 444
17  Python  0x000100d1877c 
_PyFunction_Vectorcall + 364
18  Python  0x000100e12590 
call_function + 128
19  Python  0x000100e0ff84 
_PyEval_EvalFrameDefault + 39828
20  Python  0x000100e053f0 
_PyEval_EvalCode + 444
21  Python  0x000100e5cce4 
run_eval_code_obj + 136
22  Python  0x000100e5cbf8 run_mod + 112
23  Python  0x000100e5a434 pyrun_file + 
168
24  Python  0x000100e59d58 
pyrun_simple_file + 276
25  Python  0x000100e59c04 
PyRun_SimpleFileExFlags + 80
26  Python  0x000100e79d2c 
pymain_run_file + 320
27  Python  0x000100e7947c Py_RunMain + 
916
28  Python  0x000100e7a6c4 pymain_main 
+ 36
29  Python  0x000100e7a93c Py_BytesMain 
+ 40
30  dyld0x0001007990fc start + 520
)
.

--
components: Tkinter
files: tkinter_crash.py
messages: 398889
nosy: Nythepegasus
priority: normal
severity: normal
status: open
title: Using tkinter.filedialog crashes on macOS Python 3.9.6
type: crash
versions: Python 3.9
Added file: https://bugs.python.org/file50200/tkinter_crash.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com