You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like os.getlogin doesn't work well in Python. The documentation advises to use getpass.getuser instead.
$ python3
Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.getlogin()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 6] No such device or address
>>> import getpass
>>> getpass.getuser()
'fungiboletus'
The text was updated successfully, but these errors were encountered:
Looks like
os.getlogin
doesn't work well in Python. The documentation advises to usegetpass.getuser
instead.The text was updated successfully, but these errors were encountered: