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
getpass.getuser() now raises OSError if the current user does not have a username:
Traceback (most recent call last):
File "/usr/local/lib/python3.13/getpass.py", line 173, in getuser
return pwd.getpwuid(os.getuid())[0]
~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'getpwuid(): uid not found: 1000'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
[ own code removed ]
File "/mp/raphson_mp/__main__.py", line 31, in handle_start
app.run(host=args.host, port=args.port, debug=True)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/flask/app.py", line 625, in run
run_simple(t.cast(str, host), port, self, **options)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/werkzeug/serving.py", line 1081, in run_simple
application = DebuggedApplication(application, evalex=use_evalex)
File "/usr/local/lib/python3.13/site-packages/werkzeug/debug/__init__.py", line 297, in __init__
if self.pin is None:
^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/werkzeug/debug/__init__.py", line 315, in pin
pin_cookie = get_pin_and_cookie_name(self.app)
File "/usr/local/lib/python3.13/site-packages/werkzeug/debug/__init__.py", line 175, in get_pin_and_cookie_name
username = getpass.getuser()
File "/usr/local/lib/python3.13/getpass.py", line 175, in getuser
raise OSError('No username set in the environment') from e
OSError: No username set in the environment
Under Python 3.12, the exact same code runs without an error and is able to start the development environment.
Environment:
Python version: 3.13
Werkzeug version: 3.0.4
The text was updated successfully, but these errors were encountered:
python/cpython#29739
getpass.getuser()
now raisesOSError
if the current user does not have a username:Under Python 3.12, the exact same code runs without an error and is able to start the development environment.
Environment:
The text was updated successfully, but these errors were encountered: