[GH-ISSUE #196] Strange Temp folder usage #179

Closed
opened 2026-02-26 12:20:44 +03:00 by kerem · 6 comments
Owner

Originally created by @madtatu-development on GitHub (Sep 7, 2021).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/196

Regardless the fact I have proper PATH environmental variables settings for global TEMP folder, Auto PY to EXE randomly selects a completely separate software installed software temp folder (not even set in env.variab.) to use:

{3BC2A1F1-8DDC-4165-8E38-98DFDC635D99}

{0B20656D-8028-4910-B0BB-BB8BC0A08B43}

{E511E36C-28FA-4D56-BD91-708745FF6F0A}

{EE1E8DA2-E13B-4A10-9174-AB8AAD707CB3}

Screenshot 2021-09-07 113820

Screenshot 2021-09-07 113801

  • Any idea, how can I prevent this ? Or in case this is a bug, possible to fix it ?
Originally created by @madtatu-development on GitHub (Sep 7, 2021). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/196 Regardless the fact I have proper PATH environmental variables settings for global TEMP folder, Auto PY to EXE randomly selects a completely separate software installed software temp folder (not even set in env.variab.) to use: ![{3BC2A1F1-8DDC-4165-8E38-98DFDC635D99}](https://user-images.githubusercontent.com/73760229/132322077-3b602232-a58c-4671-9228-51e5fbac7e96.png) ![{0B20656D-8028-4910-B0BB-BB8BC0A08B43}](https://user-images.githubusercontent.com/73760229/132322075-d06adf4f-0d6e-48f3-ba59-95e61c0777de.png) ![{E511E36C-28FA-4D56-BD91-708745FF6F0A}](https://user-images.githubusercontent.com/73760229/132322078-dd4d91ce-be0b-4295-ad0e-3ecefc295303.png) ![{EE1E8DA2-E13B-4A10-9174-AB8AAD707CB3}](https://user-images.githubusercontent.com/73760229/132322080-158e3658-4d36-4143-9d58-bdfcaf4c73a0.png) ![Screenshot 2021-09-07 113820](https://user-images.githubusercontent.com/73760229/132322621-313788ab-4e3b-4b6b-8bfd-ec2da9eec9b8.png) ![Screenshot 2021-09-07 113801](https://user-images.githubusercontent.com/73760229/132322624-4c10f82b-563f-4b68-bc1f-ce3f45310268.png) - Any idea, how can I prevent this ? Or in case this is a bug, possible to fix it ?
kerem 2026-02-26 12:20:44 +03:00
  • closed this issue
  • added the
    Stale
    label
Author
Owner

@brentvollebregt commented on GitHub (Sep 9, 2021):

At the moment we are using tempfile.mkdtemp()

github.com/brentvollebregt/auto-py-to-exe@ecfc50e134/auto_py_to_exe/main.py#L19

If you execute:

import shutil
import tempfile

temporary_directory = tempfile.mkdtemp()
print(temporary_directory)
shutil.rmtree(temporary_directory)

What is the directory that is printed? Still weird? I see the Python source code initially starts searching from the value returned in this function.

<!-- gh-comment-id:915902238 --> @brentvollebregt commented on GitHub (Sep 9, 2021): At the moment we are using `tempfile.mkdtemp()` https://github.com/brentvollebregt/auto-py-to-exe/blob/ecfc50e134364e3edcc787536c619a1eee298e49/auto_py_to_exe/__main__.py#L19 If you execute: ```python import shutil import tempfile temporary_directory = tempfile.mkdtemp() print(temporary_directory) shutil.rmtree(temporary_directory) ``` What is the directory that is printed? Still weird? I see the Python source code initially starts searching from the value returned in [this function](https://github.com/python/cpython/blob/b7bb54fc10ed994d86efc425b6f667ffa6660392/Lib/tempfile.py#L152).
Author
Owner

@madtatu-development commented on GitHub (Sep 10, 2021):

May I ask your help to be fool proof (I am still newbie from certain aspect):

Exactly where should I execute these 5 lines above ? You mean add these lines fixed to my code to tell phython which temp directory to use ? (Your word "execute" confuse me, thats why I ask.)

Sorry for the dummy question!

<!-- gh-comment-id:916550994 --> @madtatu-development commented on GitHub (Sep 10, 2021): May I ask your help to be fool proof (I am still newbie from certain aspect): Exactly where should I execute these 5 lines above ? You mean add these lines fixed to my code to tell phython which temp directory to use ? (Your word "execute" confuse me, thats why I ask.) Sorry for the dummy question!
Author
Owner

@brentvollebregt commented on GitHub (Sep 17, 2021):

Execute those lines using Python. The Python IDLE would be the easiest place.

Sorry for the delay in replying - have been busy.

<!-- gh-comment-id:921743723 --> @brentvollebregt commented on GitHub (Sep 17, 2021): Execute those lines using Python. The Python IDLE would be the easiest place. Sorry for the delay in replying - have been busy.
Author
Owner

@madtatu-development commented on GitHub (Oct 4, 2021):

OK, I was able to identify what's caused the problem, or at least the way to resolve it.

After a deep check in program and user directories, I realized, that Wondershare application (the one highjacked the temp folder) is HEAVILY reply on python. For some reason, it was aggressively reroute all python temp folder request to his own user application temp folder.

As soon as I completely removed it completely including ALL traces of it, the problem resolved, python and autopyexe started to use the correct, system defined temp folder.

What proofs this is not a regular behavior (only this specific software aggressive/strange approach ) is, that there are other application based on python still on the system and do not affect the temp folder.

I am planning to re-install wondershare and see what's going to happen, as well as try your solution above and report as soon as I get there.

<!-- gh-comment-id:933353400 --> @madtatu-development commented on GitHub (Oct 4, 2021): OK, I was able to identify what's caused the problem, or at least the way to resolve it. After a deep check in program and user directories, I realized, that Wondershare application (the one highjacked the temp folder) is HEAVILY reply on python. For some reason, it was aggressively reroute all python temp folder request to his own user application temp folder. As soon as I completely removed it completely including ALL traces of it, the problem resolved, python and autopyexe started to use the correct, system defined temp folder. What proofs this is not a regular behavior (only this specific software aggressive/strange approach ) is, that there are other application based on python still on the system and do not affect the temp folder. I am planning to re-install wondershare and see what's going to happen, as well as try your solution above and report as soon as I get there.
Author
Owner

@github-actions[bot] commented on GitHub (Dec 4, 2021):

This issue is stale because it has been open for 60 days with no activity. Remove stale label or comment on this issue or it will be closed in 5 days.

<!-- gh-comment-id:985931712 --> @github-actions[bot] commented on GitHub (Dec 4, 2021): This issue is stale because it has been open for 60 days with no activity. Remove stale label or comment on this issue or it will be closed in 5 days.
Author
Owner

@github-actions[bot] commented on GitHub (Dec 9, 2021):

Closing issue due to no activity in more than 60 days.

<!-- gh-comment-id:989347031 --> @github-actions[bot] commented on GitHub (Dec 9, 2021): Closing issue due to no activity in more than 60 days.
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#179
No description provided.