[GH-ISSUE #473] Clicking the select file button will freeze on macOS 14.4 arm64 #373

Closed
opened 2026-02-26 12:21:23 +03:00 by kerem · 13 comments
Owner

Originally created by @jiayouzl on GitHub (Mar 23, 2024).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/473

Originally assigned to: @brentvollebregt on GitHub.

macos 14.4 arm64 最新版本的auto-to-exe无法选择文件,点击选择文件按钮,就卡死了.

Originally created by @jiayouzl on GitHub (Mar 23, 2024). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/473 Originally assigned to: @brentvollebregt on GitHub. macos 14.4 arm64 最新版本的auto-to-exe无法选择文件,点击选择文件按钮,就卡死了.
kerem 2026-02-26 12:21:23 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@github-actions[bot] commented on GitHub (Mar 23, 2024):

👋 Hi, just a reminder that if you haven't read the help post yet, give it a read to see if your issue is covered in it and make sure to follow the debugging section.

Also please note, as stated in the README, if your issue is only associated with your application and not auto-py-to-exe itself, please do not create an issue in this repository - instead, comment on the help post, video or create a new discussion.

<!-- gh-comment-id:2016349676 --> @github-actions[bot] commented on GitHub (Mar 23, 2024): 👋 Hi, just a reminder that if you haven't read [the help post](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/) yet, give it a read to see if your issue is covered in it and make sure to follow [the debugging section](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#debugging). Also please note, as stated in the README, if your issue is only associated with your application and not auto-py-to-exe itself, please do not create an issue in this repository - instead, comment on the help [post](https://nitratine.net/blog/post/issues-when-using-auto-py-to-exe/), [video](https://youtu.be/OZSZHmWSOeM) or create a [new discussion](https://github.com/brentvollebregt/auto-py-to-exe/discussions).
Author
Owner

@brentvollebregt commented on GitHub (Mar 23, 2024):

When you say "the latest version" - does an older version work for you currently?

<!-- gh-comment-id:2016428971 --> @brentvollebregt commented on GitHub (Mar 23, 2024): When you say "the latest version" - does an older version work for you currently?
Author
Owner

@jiayouzl commented on GitHub (Mar 23, 2024):

When you say "the latest version" - does an older version work for you currently?

All have this problem!

<!-- gh-comment-id:2016452937 --> @jiayouzl commented on GitHub (Mar 23, 2024): > When you say "the latest version" - does an older version work for you currently? All have this problem!
Author
Owner

@brentvollebregt commented on GitHub (Mar 23, 2024):

Does this look related to #304 by any chance?

If you run this script in Python, does it lead to the same issue?

from tkinter import Tk
from tkinter.filedialog import askopenfilename

root = Tk()
root.withdraw()
root.wm_attributes('-topmost', 1)
file_path = askopenfilename(parent=root)
root.update()
print(file_path)
<!-- gh-comment-id:2016587298 --> @brentvollebregt commented on GitHub (Mar 23, 2024): Does this look related to #304 by any chance? If you run this script in Python, does it lead to the same issue? ```python from tkinter import Tk from tkinter.filedialog import askopenfilename root = Tk() root.withdraw() root.wm_attributes('-topmost', 1) file_path = askopenfilename(parent=root) root.update() print(file_path) ```
Author
Owner

@jiayouzl commented on GitHub (Mar 24, 2024):

Does this look related to #304 by any chance?

If you run this script in Python, does it lead to the same issue?

from tkinter import Tk
from tkinter.filedialog import askopenfilename

root = Tk()
root.withdraw()
root.wm_attributes('-topmost', 1)
file_path = askopenfilename(parent=root)
root.update()
print(file_path)

Yes, Python 3.9.19 encountered the same problem when running.

<!-- gh-comment-id:2016708200 --> @jiayouzl commented on GitHub (Mar 24, 2024): > Does this look related to #304 by any chance? > > If you run this script in Python, does it lead to the same issue? > > ```python > from tkinter import Tk > from tkinter.filedialog import askopenfilename > > root = Tk() > root.withdraw() > root.wm_attributes('-topmost', 1) > file_path = askopenfilename(parent=root) > root.update() > print(file_path) > ``` Yes, Python 3.9.19 encountered the same problem when running.
Author
Owner

@jiayouzl commented on GitHub (Mar 24, 2024):

root.withdraw()

Delete the code line above and it will be normal.

<!-- gh-comment-id:2016708603 --> @jiayouzl commented on GitHub (Mar 24, 2024): ``` root.withdraw() ``` Delete the code line above and it will be normal.
Author
Owner

@brentvollebregt commented on GitHub (Mar 24, 2024):

Great find, however when removing root.withdraw(), I imagine there is another small window that appears which looks like this:

image

Do you also get this same window?

Aside from answering that question, could you also try this:

from tkinter import Tk
from tkinter.filedialog import askopenfilename

root = Tk()
root.withdraw()
# root.wm_attributes('-topmost', 1)
file_path = askopenfilename(parent=root)
root.update()
print(file_path)

Wondering if root.wm_attributes('-topmost', 1) is the issue as it's trying to interact with a window that's no longer there.

<!-- gh-comment-id:2016713209 --> @brentvollebregt commented on GitHub (Mar 24, 2024): Great find, however when removing `root.withdraw()`, I imagine there is another small window that appears which looks like this: ![image](https://github.com/brentvollebregt/auto-py-to-exe/assets/19944838/481b3308-6ee0-489a-a9b7-19a9aefda7a0) Do you also get this same window? Aside from answering that question, could you also try this: ```python from tkinter import Tk from tkinter.filedialog import askopenfilename root = Tk() root.withdraw() # root.wm_attributes('-topmost', 1) file_path = askopenfilename(parent=root) root.update() print(file_path) ``` Wondering if `root.wm_attributes('-topmost', 1)` is the issue as it's trying to interact with a window that's no longer there.
Author
Owner

@jiayouzl commented on GitHub (Mar 24, 2024):

Great find, however when removing root.withdraw(), I imagine there is another small window that appears which looks like this:

image

Do you also get this same window?

Aside from answering that question, could you also try this:

from tkinter import Tk
from tkinter.filedialog import askopenfilename

root = Tk()
root.withdraw()
# root.wm_attributes('-topmost', 1)
file_path = askopenfilename(parent=root)
root.update()
print(file_path)

Wondering if root.wm_attributes('-topmost', 1) is the issue as it's trying to interact with a window that's no longer there.

No, the problem is not solved.

<!-- gh-comment-id:2016715218 --> @jiayouzl commented on GitHub (Mar 24, 2024): > Great find, however when removing `root.withdraw()`, I imagine there is another small window that appears which looks like this: > > ![image](https://private-user-images.githubusercontent.com/19944838/316290263-481b3308-6ee0-489a-a9b7-19a9aefda7a0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTEyNjM3MzYsIm5iZiI6MTcxMTI2MzQzNiwicGF0aCI6Ii8xOTk0NDgzOC8zMTYyOTAyNjMtNDgxYjMzMDgtNmVlMC00ODlhLWE5YjctMTlhOWFlZmRhN2EwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzI0VDA2NTcxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEwN2Y2NTJiNDRjZjEzYzhkZmNkODBhYTRiMzU4YzJhZTE5Yjc5MWQ4OTY1ODAyYzdiN2Q0NGZjMzFhMWEwZDAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.NMV3Z_rlzatRb9KRryR1KTTPyefYC35Ye6A5EhQ6RK0) > > Do you also get this same window? > > Aside from answering that question, could you also try this: > > ```python > from tkinter import Tk > from tkinter.filedialog import askopenfilename > > root = Tk() > root.withdraw() > # root.wm_attributes('-topmost', 1) > file_path = askopenfilename(parent=root) > root.update() > print(file_path) > ``` > > Wondering if `root.wm_attributes('-topmost', 1)` is the issue as it's trying to interact with a window that's no longer there. No, the problem is not solved.
Author
Owner

@jiayouzl commented on GitHub (Mar 24, 2024):

I tried to change the code, and the final code is as follows. You can refer to it, and my test here is already working properly.

# -*- coding: UTF-8 -*-

from tkinter import Tk
from tkinter.filedialog import askopenfilename

root = Tk()
root.withdraw()

root.wm_attributes('-topmost', 1)
file_path = askopenfilename()
root.update()
print(file_path)
<!-- gh-comment-id:2016715781 --> @jiayouzl commented on GitHub (Mar 24, 2024): I tried to change the code, and the final code is as follows. You can refer to it, and my test here is already working properly. ```Python # -*- coding: UTF-8 -*- from tkinter import Tk from tkinter.filedialog import askopenfilename root = Tk() root.withdraw() root.wm_attributes('-topmost', 1) file_path = askopenfilename() root.update() print(file_path) ```
Author
Owner

@brentvollebregt commented on GitHub (Mar 24, 2024):

Oh, that's really interesting; dropping parent=root from the askopenfilename call. Thank you very much for testing this - I'll take a look at that parameter and see if it makes sense to drop.

<!-- gh-comment-id:2016734891 --> @brentvollebregt commented on GitHub (Mar 24, 2024): Oh, that's really interesting; dropping `parent=root` from the `askopenfilename` call. Thank you very much for testing this - I'll take a look at that parameter and see if it makes sense to drop.
Author
Owner

@brentvollebregt commented on GitHub (Mar 24, 2024):

I've just released auto-py-to-exe 2.43.2 with this change - hopefully this fixes the issue. Let me know if it doesn't and we can look into this more.

<!-- gh-comment-id:2016747245 --> @brentvollebregt commented on GitHub (Mar 24, 2024): I've just released [auto-py-to-exe 2.43.2](https://github.com/brentvollebregt/auto-py-to-exe/releases/tag/v2.43.2) with this change - hopefully this fixes the issue. Let me know if it doesn't and we can look into this more.
Author
Owner

@jiayouzl commented on GitHub (Mar 24, 2024):

I've just released auto-py-to-exe 2.43.2 with this change - hopefully this fixes the issue. Let me know if it doesn't and we can look into this more.

Okay, 2.43.2 can be used now.

There are still some minor issues, such as after selecting a file once, when selecting the file again, the file selection dialog is in the background of the program instead of in the foreground, and you have to manually bring it up.

<!-- gh-comment-id:2016762628 --> @jiayouzl commented on GitHub (Mar 24, 2024): > I've just released [auto-py-to-exe 2.43.2](https://github.com/brentvollebregt/auto-py-to-exe/releases/tag/v2.43.2) with this change - hopefully this fixes the issue. Let me know if it doesn't and we can look into this more. Okay, 2.43.2 can be used now. There are still some minor issues, such as after selecting a file once, when selecting the file again, the file selection dialog is in the background of the program instead of in the foreground, and you have to manually bring it up.
Author
Owner

@brentvollebregt commented on GitHub (Mar 24, 2024):

There are still some minor issues, such as after selecting a file once, when selecting the file again, the file selection dialog is in the background of the program instead of in the foreground, and you have to manually bring it up.

I've just put a change on the master branch that may fix this. Instead of creating a new tkinter.Tk object each time, only one is created.

<!-- gh-comment-id:2016763195 --> @brentvollebregt commented on GitHub (Mar 24, 2024): > There are still some minor issues, such as after selecting a file once, when selecting the file again, the file selection dialog is in the background of the program instead of in the foreground, and you have to manually bring it up. I've just put a change on the master branch that may fix this. Instead of creating a new `tkinter.Tk` object each time, only one is created.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/auto-py-to-exe#373
No description provided.