[GH-ISSUE #185] hook-gevent freeze and waits for data from the previous script to be entered. #169

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

Originally created by @Micah89x on GitHub (Jul 31, 2021).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/185

Hello,

Every time when I compile a script to exe, the console window displaying me the "input" from the old script which I compiled to exe. When I press ENTER the script compiles correctly, but it is quite annoying.

Previously, even as I had scripts with input data from the user the auto-py-to-exe did not wait for the data.

I have Python 3.9.1 64 bit, Pyinstaller 4.3 and newest Auto-Py-To-Exe.

Originally created by @Micah89x on GitHub (Jul 31, 2021). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/185 Hello, Every time when I compile a script to exe, the console window displaying me the "input" from the old script which I compiled to exe. When I press ENTER the script compiles correctly, but it is quite annoying. Previously, even as I had scripts with input data from the user the auto-py-to-exe did not wait for the data. I have Python 3.9.1 64 bit, Pyinstaller 4.3 and newest Auto-Py-To-Exe.
kerem closed this issue 2026-02-26 12:20:42 +03:00
Author
Owner

@brentvollebregt commented on GitHub (Jul 31, 2021):

This looks similar to #162 which we did not get to the bottom of - what libraries are you using in your script?

Also if you create a clean virtual environment, install auto-py-to-exe and your dependencies, do you still have the same issue?

<!-- gh-comment-id:890416075 --> @brentvollebregt commented on GitHub (Jul 31, 2021): This looks similar to #162 which we did not get to the bottom of - what libraries are you using in your script? Also if you create a clean virtual environment, install auto-py-to-exe and your dependencies, do you still have the same issue?
Author
Owner

@Micah89x commented on GitHub (Aug 1, 2021):

I've already tried on another version of Python and Auto-py-to-exe with no results.

I noticed that the problem came up after compiling to exe script in which subprocesses and getpass were used, I mistakenly set the auto-py-to-exe options to noconsole. I generates an .exe file from the gui not from the console.

<!-- gh-comment-id:890470272 --> @Micah89x commented on GitHub (Aug 1, 2021): I've already tried on another version of Python and Auto-py-to-exe with no results. I noticed that the problem came up after compiling to exe script in which subprocesses and getpass were used, I mistakenly set the auto-py-to-exe options to noconsole. I generates an .exe file from the gui not from the console.
Author
Owner

@brentvollebregt commented on GitHub (Aug 2, 2021):

Does either noconsole or console mode generate an executable and the other doesn't?

<!-- gh-comment-id:890862309 --> @brentvollebregt commented on GitHub (Aug 2, 2021): Does either noconsole or console mode generate an executable and the other doesn't?
Author
Owner

@Micah89x commented on GitHub (Aug 2, 2021):

Both modes are waiting for data. This is a password input (getpass command) from another script, not the one from which a file currently generates.

<!-- gh-comment-id:890870958 --> @Micah89x commented on GitHub (Aug 2, 2021): Both modes are waiting for data. This is a password input (getpass command) from another script, not the one from which a file currently generates.
Author
Owner

@brentvollebregt commented on GitHub (Aug 2, 2021):

Sorry, so is all working now?

<!-- gh-comment-id:890881197 --> @brentvollebregt commented on GitHub (Aug 2, 2021): Sorry, so is all working now?
Author
Owner

@Micah89x commented on GitHub (Aug 2, 2021):

Works only with cmd/powershell, from GUI doesn't, even with the simple Hello World.py asks for a password.
I will attach the screenshot later.

<!-- gh-comment-id:890883423 --> @Micah89x commented on GitHub (Aug 2, 2021): Works only with cmd/powershell, from GUI doesn't, even with the simple Hello World.py asks for a password. I will attach the screenshot later.
Author
Owner

@brentvollebregt commented on GitHub (Aug 2, 2021):

Could you please provide a basic script that does not package in auto-py-to-exe? Preferably in text please.

<!-- gh-comment-id:890895288 --> @brentvollebregt commented on GitHub (Aug 2, 2021): Could you please provide a basic script that does not package in auto-py-to-exe? Preferably in text please.
Author
Owner

@Micah89x commented on GitHub (Aug 2, 2021):

I can try to pack the simple script with the print command and anyway while generating the auto-py-to-exe will stop at hook-gevent and waiting to type anything. This is an input from a script that was packed a few days earlier. Script is successfully packed when you press enter button, but why Auto-py-to-exe remember data from another script?

<!-- gh-comment-id:890914082 --> @Micah89x commented on GitHub (Aug 2, 2021): I can try to pack the simple script with the print command and anyway while generating the auto-py-to-exe will stop at hook-gevent and waiting to type anything. This is an input from a script that was packed a few days earlier. Script is successfully packed when you press enter button, but why Auto-py-to-exe remember data from another script?
Author
Owner

@brentvollebregt commented on GitHub (Aug 2, 2021):

My best guess is that you packaged a script that worked, went to package a new script (days later that failed) and it failed. You then went into the output folder and the previously packaged script is still there as you did not remove it.

I cannot be 100% sure though, it is not entirely clear what you are doing - this is simply my guess.

<!-- gh-comment-id:890917451 --> @brentvollebregt commented on GitHub (Aug 2, 2021): My best guess is that you packaged a script that worked, went to package a new script (days later that failed) and it failed. You then went into the output folder and the previously packaged script is still there as you did not remove it. I cannot be 100% sure though, it is not entirely clear what you are doing - this is simply my guess.
Author
Owner

@Micah89x commented on GitHub (Aug 2, 2021):

However a problem occurs when I use the mega.py module. In this problematic script I had something like this:

import getpass
from mega import Mega

email = input("Email address : ")
password = getpass.getpass("Password : ")

mega = Mega()
m = mega.login(email,password)
file = m.upload("C:/temp/req.txt")
m.get_upload_link(file)
<!-- gh-comment-id:891326074 --> @Micah89x commented on GitHub (Aug 2, 2021): However a problem occurs when I use the mega.py module. In this problematic script I had something like this: ```py import getpass from mega import Mega email = input("Email address : ") password = getpass.getpass("Password : ") mega = Mega() m = mega.login(email,password) file = m.upload("C:/temp/req.txt") m.get_upload_link(file) ```
Author
Owner

@brentvollebregt commented on GitHub (Aug 3, 2021):

@Micah89x will it only fail packaging if you:

  1. import getpass
  2. import mega
  3. Get an email and password from the user
  4. Create an instance of Mega
  5. Login and upload a file to Mega

I feel like there may be some unrequited extra steps here.

I'm trying to get a minimal working example - even if it is as basic as a single import, that is all I need.

<!-- gh-comment-id:891574720 --> @brentvollebregt commented on GitHub (Aug 3, 2021): @Micah89x will it only fail packaging if you: 1. import getpass 2. import mega 3. Get an email and password from the user 4. Create an instance of Mega 5. Login and upload a file to Mega I feel like there may be some unrequited extra steps here. I'm trying to get a [minimal working example](https://en.wikipedia.org/wiki/Minimal_working_example) - even if it is as basic as a single import, that is all I need.
Author
Owner

@Micah89x commented on GitHub (Aug 3, 2021):

Importing only mega.py is already causing the problem.

<!-- gh-comment-id:892062854 --> @Micah89x commented on GitHub (Aug 3, 2021): Importing only mega.py is already causing the problem.
Author
Owner

@brentvollebregt commented on GitHub (Aug 4, 2021):

@Micah89x I used the following script (test.py):

from mega import Mega
print('success')

Running this locally prints "success". However when it tried to execute pyinstaller test.py, it would not build at all and I was getting a message associated to:

SystemExit: Unable to find "c:\users\user\test-environment.venv\lib\site-packages<package>.dist-info" when adding binary and data files.

Were you getting this also? I actually have just seen you never provided an error at all.

<!-- gh-comment-id:892406886 --> @brentvollebregt commented on GitHub (Aug 4, 2021): @Micah89x I used the following script (test.py): ```python from mega import Mega print('success') ``` Running this locally prints "success". However when it tried to execute `pyinstaller test.py`, it would not build at all and I was getting a message associated to: > SystemExit: Unable to find "c:\users\user\test-environment\.venv\lib\site-packages\<package>.dist-info" when adding binary and data files. Were you getting this also? I actually have just seen you never provided an error at all.
Author
Owner

@Micah89x commented on GitHub (Aug 4, 2021):

I don't get any error, there's a problem that I've described before - hook-gevent freeze and waiting for data from old script (GUI) and from command line work properly.

<!-- gh-comment-id:892412348 --> @Micah89x commented on GitHub (Aug 4, 2021): I don't get any error, there's a problem that I've described before - hook-gevent freeze and waiting for data from old script (GUI) and from command line work properly.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 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:933064811 --> @github-actions[bot] commented on GitHub (Oct 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 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:985931720 --> @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 (Feb 4, 2022):

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:1029537110 --> @github-actions[bot] commented on GitHub (Feb 4, 2022): 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

@brentvollebregt commented on GitHub (Feb 4, 2022):

I just tried the script above that prints "success" after the import again and all seems to be fine.

I'll close this for now but if I can get an example of something that is broken, we can open this back up.

<!-- gh-comment-id:1029901620 --> @brentvollebregt commented on GitHub (Feb 4, 2022): I just tried the script above that prints "success" after the import again and all seems to be fine. I'll close this for now but if I can get an example of something that is broken, we can open this back up.
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#169
No description provided.