I have been using access token in app.py to read/write a dataset. Due to a recent security update on HuggingFace, my access token was revoked. I had to create a new token, but app.py returned a runtime error everytime when I tried to run this line of code:
login(token=os.environ.get(“new_data_token”), write_permission=True)
/usr/local/lib/python3.10/getpass.py:91: GetPassWarning: Can not control echo on the terminal.
passwd = fallback_getpass(prompt, stream)
Warning: Password input may be echoed.
Enter your token (input will not be visible): Traceback (most recent call last):
File “/usr/local/lib/python3.10/getpass.py”, line 69, in unix_getpass
old = termios.tcgetattr(fd) # a copy to save
termios.error: (25, ‘Inappropriate ioctl for device’)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/user/app/app.py”, line 15, in
login(token=os.environ.get(“new_data_token”), write_permission=True)
File “/usr/local/lib/python3.10/site-packages/huggingface_hub/_login.py”, line 115, in login
interpreter_login(new_session=new_session, write_permission=write_permission)
File “/usr/local/lib/python3.10/site-packages/huggingface_hub/_login.py”, line 191, in interpreter_login
token = getpass("Enter your token (input will not be visible): ")
File “/usr/local/lib/python3.10/getpass.py”, line 91, in unix_getpass
passwd = fallback_getpass(prompt, stream)
File “/usr/local/lib/python3.10/getpass.py”, line 126, in fallback_getpass
return _raw_input(prompt, stream)
File “/usr/local/lib/python3.10/getpass.py”, line 148, in _raw_input
raise EOFError
EOFError
Please help. Thanks!!