question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setup fails with KeyError: 'WERKZEUG_SERVER_FD'

See original GitHub issue

Output of the ue4-docker info command:

anip@blade:~/codes$ ue4-docker info
/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.9) or chardet (3.0.4) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
ue4-docker version:         0.0.96 (latest available version is 0.0.96)
Operating system:           Linux (Ubuntu 20.04.3 LTS, 5.13.0-37-generic)
Docker daemon version:      20.10.14
NVIDIA Docker supported:    Yes
Maximum image size:         No limit detected
Available disk space:       150.23 GiB
Total system memory:        15.53 GiB physical, 2 GiB virtual
CPU:                        6 physical, 12 logical (x86_64)

Additional details:

I am trying to run setup with sudo ue4-docker setup.

I get the error:

anip@blade:~/codes$ sudo ue4-docker setup
/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.9) or chardet (3.0.4) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.8/dist-packages/ue4docker/infrastructure/CredentialEndpoint.py", line 84, in _endpoint
    server.run(host="0.0.0.0", port=9876)
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 920, in run
    run_simple(t.cast(str, host), port, self, **options)
  File "/usr/local/lib/python3.8/dist-packages/werkzeug/serving.py", line 1047, in run_simple
    fd = int(os.environ["WERKZEUG_SERVER_FD"])
  File "/usr/lib/python3.8/os.py", line 675, in __getitem__
    raise KeyError(key) from None
KeyError: 'WERKZEUG_SERVER_FD'
Traceback (most recent call last):
  File "/usr/local/bin/ue4-docker", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/ue4docker/main.py", line 112, in main
    COMMANDS[command]["function"]()
  File "/usr/local/lib/python3.8/dist-packages/ue4docker/setup_cmd.py", line 156, in setup
    _setupLinux()
  File "/usr/local/lib/python3.8/dist-packages/ue4docker/setup_cmd.py", line 19, in _setupLinux
    endpoint.start()
  File "/usr/local/lib/python3.8/dist-packages/ue4docker/infrastructure/CredentialEndpoint.py", line 53, in start
    raise RuntimeError("failed to start the credential endpoint")
RuntimeError: failed to start the credential endpoint

  • Are you accessing the network through a proxy server? Yes/No No

(The rest of the issue description goes here. If you’re reporting a problem with building container images, be sure to include the full output of the ue4-docker build command, including the initial output lines that display the command line parameters used to invoke the build. If you’re making a feature request, you can remove the template contents entirely, since the ue4-docker info output and related information is only needed for helping diagnose and reproduce bugs.)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
slonopotamuscommented, Apr 1, 2022

Actually, using whole Flask for a single HTTP endpoint sounds like a bit of an overkill.

1reaction
Polterageistcommented, Apr 1, 2022

Hi! It is a bug in dependency. I found workaround. Just install werkzeug package with forced 2.0.0 version. I’m using pipenv so for me it just: pipenv install werkzeug==2.0.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fails to start with KeyError: WERKZEUG_SERVER_FD #425
Try an older version of python library "werkzeug". Version 2.1.0 was faulty for me. Version 2.0.0 does work. pip install werkzeug==2.0.0 ...
Read more >
rest - Unable to resolve KeyError in Python using Flask
I continue to get this KeyError even though the key "name" obviously exists. I've attempted a couple methods to iterate through an array...
Read more >
werkzeug.serving — Flask API - GitHub Pages
Sourcecode won't reload itself when changed and each time you kill the server using ``^C`` you get an `KeyboardInterrupt` error. While the latter...
Read more >
My first python microservice with PyMS | by Shruti Pal | Medium
Lastly, an KeyError: 'WERKZEUG_SERVER_FD'. Actually, werkzeug is a comprehensive WSGI web application library. To get through this error, ...
Read more >
What a Python KeyError Usually Means
The program fails when you give a key that is not in the dictionary. Here, the traceback's last few lines point to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found