Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Internal Server Error when requesting a nonexistent page under Python 3.8 #1670

Open
jvstme opened this issue Sep 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jvstme
Copy link
Collaborator

jvstme commented Sep 6, 2024

Steps to reproduce

  1. Run dstack server under Python 3.8.
  2. Open http://localhost:3000/aoaoaooao in the browser.

Actual behaviour

Browser says "Internal Server Error".

Expected behaviour

Browser shows the "Not found" page.

dstack version

master

Server logs

File "/home/jvstme/git/dstack/dstack/src/dstack/_internal/server/app.py", line 243, in custom_http_exception_handler
    importlib.resources.files("dstack._internal.server")
AttributeError: module 'importlib.resources' has no attribute 'files'

Additional information

While Python 3.8 is going to be deprecated soon, importlib.resources had other API changes in recent Python versions, which can be causing deprecation warnings now and errors in the future. To avoid them, I can suggest using the official backport.

@jvstme jvstme added the bug Something isn't working label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant