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

FileNotFoundError during scantree() caused by broken symlink #605

Closed
fdemmer opened this issue Aug 26, 2024 · 1 comment
Closed

FileNotFoundError during scantree() caused by broken symlink #605

fdemmer opened this issue Aug 26, 2024 · 1 comment

Comments

@fdemmer
Copy link

fdemmer commented Aug 26, 2024

Python Version

3.9.18

Django Version

4.1.13

Package Version

6.7.0

Description

A few days ago an unfortunate chain of events lead to a script producing a broken symlink in my staticfiles path, a subsequent automatic reload of the server caused whitenoise to update its file dict, ultimately leading to a FileNotFoundError in scantree() and crashing the whole thing.

I propose exception handling and a warning in #604

Not sure if there is a better way to test the broken symlink, other than committing one 🤔

@adamchainz
Copy link
Collaborator

Per comment on the issue, I am not convinced Whitenoise should hide this error. Maybe if others encounter it, we can reopen and discuss.

@adamchainz adamchainz closed this as not planned Won't fix, can't repro, duplicate, stale Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@fdemmer @adamchainz and others