mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix crash on Windows10 when configure script given no HF token
Crashes would occur in the invokeai-configure script if no HF token was found in cache and the user declines to provide one when prompted. The reason appears to be that on Linux systems getpass_asterisk() raises an EOFError when no input is provided On windows10, getpass_asterisk() does not raise the EOFError, but returns an empty string instead. This patch detects this and raises the exception so that the control logic is preserved.
This commit is contained in:
parent
c50b64ec1d
commit
7fa3a499bb
@ -320,6 +320,8 @@ You may re-run the configuration script again in the future if you do not wish t
|
||||
while again:
|
||||
try:
|
||||
access_token = getpass_asterisk.getpass_asterisk(prompt="HF Token ❯ ")
|
||||
if access_token is None or len(access_token)==0:
|
||||
raise EOFError
|
||||
HfLogin(access_token)
|
||||
access_token = HfFolder.get_token()
|
||||
again = False
|
||||
|
Loading…
Reference in New Issue
Block a user