[GH-ISSUE #342] Script Browser Window Suddenly Opening Halfway Off Screen #288

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

Originally created by @carmitrey on GitHub (Dec 7, 2022).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/342

Discussed in https://github.com/brentvollebregt/auto-py-to-exe/discussions/341

Originally posted by carmitrey December 7, 2022
Up until today, this has worked flawlessly and is a great and easy tool for those looking to distribute apps without needing to worry about having end users download dependencies.

However, starting recently, when I click "Browse" next to the Script Location field, the Finder window is opening half-way off the screen and I cannot figure out how to fix it or move it back. I am unable to simply drag it back into view.

Screen Shot 2022-12-07 at 2 54 54 PM

I have tried simply rebooting Mac OS but that doesn't seem to fix the issue and wasn't sure maybe there is some caching somewhere that keeps loading the window in this position rather than in the center of my screen.

If it's any help, this seemed to start after I had started using an additional monitor and discontinued using it later.

Appreciate any assistance on figuring out how to move this window back into view.

Thanks!

Originally created by @carmitrey on GitHub (Dec 7, 2022). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/342 ### Discussed in https://github.com/brentvollebregt/auto-py-to-exe/discussions/341 <div type='discussions-op-text'> <sup>Originally posted by **carmitrey** December 7, 2022</sup> Up until today, this has worked flawlessly and is a great and easy tool for those looking to distribute apps without needing to worry about having end users download dependencies. However, starting recently, when I click "Browse" next to the Script Location field, the Finder window is opening half-way off the screen and I cannot figure out how to fix it or move it back. I am unable to simply drag it back into view. <img width="1535" alt="Screen Shot 2022-12-07 at 2 54 54 PM" src="https://user-images.githubusercontent.com/76013426/206282490-3758f10c-b737-4c4b-981b-e39972aec34b.png"> I have tried simply rebooting Mac OS but that doesn't seem to fix the issue and wasn't sure maybe there is some caching somewhere that keeps loading the window in this position rather than in the center of my screen. If it's any help, this seemed to start after I had started using an additional monitor and discontinued using it later. Appreciate any assistance on figuring out how to move this window back into view. Thanks!</div>
kerem closed this issue 2026-02-26 12:21:05 +03:00
Author
Owner

@brentvollebregt commented on GitHub (Dec 10, 2022):

If you execute the following, do you get the same result:

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(f"Result: {file_path}")
<!-- gh-comment-id:1345379951 --> @brentvollebregt commented on GitHub (Dec 10, 2022): If you execute the following, do you get the same result: ```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(f"Result: {file_path}") ```
Author
Owner

@carmitrey commented on GitHub (Dec 12, 2022):

If you execute the following, do you get the same result:

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(f"Result: {file_path}")

Yes, I get the Tkinter window in the same exact place down in the bottom left as shown in my screenshot.

<!-- gh-comment-id:1346581273 --> @carmitrey commented on GitHub (Dec 12, 2022): > If you execute the following, do you get the same result: > > ```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(f"Result: {file_path}") > ``` Yes, I get the Tkinter window in the same exact place down in the bottom left as shown in my screenshot.
Author
Owner

@carmitrey commented on GitHub (Dec 12, 2022):

@brentvollebregt
Oddly, if I comment out the line root.wm_attributes('-topmost', 1), the window centers perfectly in the middle of my main monitor again.

Within dialogs.py of the auto-py-to-exe package, I commented out lines 28, 51, 62, 73, and it seems to be working again!

Additionally, I was able to print out the coordinates of the window as well while testing:

print("Coordinates:", root.winfo_x(), root.winfo_y())

For whatever reason Tkinter is seeing 0,0 as being off the screen, which is weird as it didn't do this previously.

<!-- gh-comment-id:1346940920 --> @carmitrey commented on GitHub (Dec 12, 2022): @brentvollebregt Oddly, if I comment out the line `root.wm_attributes('-topmost', 1)`, the window centers perfectly in the middle of my main monitor again. Within [dialogs.py](https://github.com/brentvollebregt/auto-py-to-exe/blob/master/auto_py_to_exe/dialogs.py) of the auto-py-to-exe package, I commented out lines 28, 51, 62, 73, and it seems to be working again! Additionally, I was able to print out the coordinates of the window as well while testing: `print("Coordinates:", root.winfo_x(), root.winfo_y())` For whatever reason Tkinter is seeing 0,0 as being off the screen, which is weird as it didn't do this previously.
Author
Owner

@brentvollebregt commented on GitHub (Dec 13, 2022):

I believe we need root.wm_attributes('-topmost', 1) so the dialog appears on top of other windows (otherwise users won't see them open).

When you removed the lines, did the dialogs start appearing under others sometimes?

<!-- gh-comment-id:1347780621 --> @brentvollebregt commented on GitHub (Dec 13, 2022): I believe we need `root.wm_attributes('-topmost', 1)` so the dialog appears on top of other windows (otherwise users won't see them open). When you removed the lines, did the dialogs start appearing under others sometimes?
Author
Owner

@carmitrey commented on GitHub (Dec 13, 2022):

Yea, that is what that seems to be used for.

At least in my case, it does hide the window behind anything that is
currently displayed, but the window is at least usable.

I am going to try uninstalling the packages today and reinstall them as I
think this is more of an issue with Tkinter than I think it's your library.

Open to any other suggestions but this seems to at least work for the time
being.

Thanks!

On Tue, Dec 13, 2022 at 12:47 AM Brent Vollebregt @.***>
wrote:

I believe we need root.wm_attributes('-topmost', 1) so the dialog appears
on top of other windows (otherwise users won't see them open).

When you removed the lines, did the dialogs start appearing under others
sometimes?


Reply to this email directly, view it on GitHub
https://urldefense.com/v3/__https://github.com/brentvollebregt/auto-py-to-exe/issues/342*issuecomment-1347780621__;Iw!!Eb2lA6X1TUGobEE!xo5UpT4ZbG7WP0i0n7DpJiH8iIuJ6jm2JBp3yuUhK01xU3c52EaJ6NuRSt_GokLcU0Plhi40Uw7wQLME1xD3-ZFaW3UimrYBc-M$,
or unsubscribe
https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ASD564W3GLMENXPLZFD5MULWNAEYNANCNFSM6AAAAAASXIOROY__;!!Eb2lA6X1TUGobEE!xo5UpT4ZbG7WP0i0n7DpJiH8iIuJ6jm2JBp3yuUhK01xU3c52EaJ6NuRSt_GokLcU0Plhi40Uw7wQLME1xD3-ZFaW3Uiwk-TxJ0$
.
You are receiving this because you authored the thread.Message ID:
@.***>

<!-- gh-comment-id:1348660903 --> @carmitrey commented on GitHub (Dec 13, 2022): Yea, that is what that seems to be used for. At least in my case, it does hide the window behind anything that is currently displayed, but the window is at least usable. I am going to try uninstalling the packages today and reinstall them as I think this is more of an issue with Tkinter than I think it's your library. Open to any other suggestions but this seems to at least work for the time being. Thanks! On Tue, Dec 13, 2022 at 12:47 AM Brent Vollebregt ***@***.***> wrote: > I believe we need root.wm_attributes('-topmost', 1) so the dialog appears > on top of other windows (otherwise users won't see them open). > > When you removed the lines, did the dialogs start appearing under others > sometimes? > > — > Reply to this email directly, view it on GitHub > <https://urldefense.com/v3/__https://github.com/brentvollebregt/auto-py-to-exe/issues/342*issuecomment-1347780621__;Iw!!Eb2lA6X1TUGobEE!xo5UpT4ZbG7WP0i0n7DpJiH8iIuJ6jm2JBp3yuUhK01xU3c52EaJ6NuRSt_GokLcU0Plhi40Uw7wQLME1xD3-ZFaW3UimrYBc-M$>, > or unsubscribe > <https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ASD564W3GLMENXPLZFD5MULWNAEYNANCNFSM6AAAAAASXIOROY__;!!Eb2lA6X1TUGobEE!xo5UpT4ZbG7WP0i0n7DpJiH8iIuJ6jm2JBp3yuUhK01xU3c52EaJ6NuRSt_GokLcU0Plhi40Uw7wQLME1xD3-ZFaW3Uiwk-TxJ0$> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Author
Owner

@brentvollebregt commented on GitHub (Dec 14, 2022):

With you saying you still have the issue when just running the snippet I gave you, it shows you're right in saying it's not auto-py-to-exe. I have never seen this issue before so am unable to provide any more help sorry.

<!-- gh-comment-id:1350928915 --> @brentvollebregt commented on GitHub (Dec 14, 2022): With you saying you still have the issue when just running the snippet I gave you, it shows you're right in saying it's not auto-py-to-exe. I have never seen this issue before so am unable to provide any more help sorry.
Author
Owner

@carmitrey commented on GitHub (Dec 14, 2022):

No worries Brent!

I'll keep digging, but I appreciate you pointing me in the right direction.

On Wed, Dec 14, 2022 at 5:58 AM Brent Vollebregt @.***>
wrote:

With you saying you still have the issue when just running the snippet I
gave you, it shows you're right in saying it's not auto-py-to-exe. I have
never seen this issue before so am unable to provide any more help sorry.


Reply to this email directly, view it on GitHub
https://urldefense.com/v3/__https://github.com/brentvollebregt/auto-py-to-exe/issues/342*issuecomment-1350928915__;Iw!!Eb2lA6X1TUGobEE!xonlDB9v4WN7UVDgqCPln0mSZo_-fvJpKhXKpg9OhZWgjILB-SrJ5pXtNTxpgQMmX1pOHNF-P8ehExVpVonsENRBWcFSMZ7n3x4$,
or unsubscribe
https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ASD564SEHU6PYUAIFYZMVSDWNGR47ANCNFSM6AAAAAASXIOROY__;!!Eb2lA6X1TUGobEE!xonlDB9v4WN7UVDgqCPln0mSZo_-fvJpKhXKpg9OhZWgjILB-SrJ5pXtNTxpgQMmX1pOHNF-P8ehExVpVonsENRBWcFS2UhNjgo$
.
You are receiving this because you authored the thread.Message ID:
@.***>

<!-- gh-comment-id:1351571109 --> @carmitrey commented on GitHub (Dec 14, 2022): No worries Brent! I'll keep digging, but I appreciate you pointing me in the right direction. On Wed, Dec 14, 2022 at 5:58 AM Brent Vollebregt ***@***.***> wrote: > With you saying you still have the issue when just running the snippet I > gave you, it shows you're right in saying it's not auto-py-to-exe. I have > never seen this issue before so am unable to provide any more help sorry. > > — > Reply to this email directly, view it on GitHub > <https://urldefense.com/v3/__https://github.com/brentvollebregt/auto-py-to-exe/issues/342*issuecomment-1350928915__;Iw!!Eb2lA6X1TUGobEE!xonlDB9v4WN7UVDgqCPln0mSZo_-fvJpKhXKpg9OhZWgjILB-SrJ5pXtNTxpgQMmX1pOHNF-P8ehExVpVonsENRBWcFSMZ7n3x4$>, > or unsubscribe > <https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ASD564SEHU6PYUAIFYZMVSDWNGR47ANCNFSM6AAAAAASXIOROY__;!!Eb2lA6X1TUGobEE!xonlDB9v4WN7UVDgqCPln0mSZo_-fvJpKhXKpg9OhZWgjILB-SrJ5pXtNTxpgQMmX1pOHNF-P8ehExVpVonsENRBWcFS2UhNjgo$> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Author
Owner

@brentvollebregt commented on GitHub (Dec 15, 2022):

I'll close this issue for now but if you find auto-py-to-exe is doing something wrong in this context, comment and we can re-open the issue 👌

<!-- gh-comment-id:1352847307 --> @brentvollebregt commented on GitHub (Dec 15, 2022): I'll close this issue for now but if you find auto-py-to-exe is doing something wrong in this context, comment and we can re-open the issue 👌
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#288
No description provided.