diff --git a/dash/dash.py b/dash/dash.py index 707b803775..5ddb90f7c6 100644 --- a/dash/dash.py +++ b/dash/dash.py @@ -982,10 +982,12 @@ def serve_component_suites(self, package_name, fingerprinted_path): path_in_pkg, package.__path__, ) - - response = flask.Response( - pkgutil.get_data(package_name, path_in_pkg), mimetype=mimetype - ) + + try: + data = pkgutil.get_data(package_name, path_in_pkg) + except FileNotFoundError: + flask.abort(404) + response = flask.Response(data, mimetype=mimetype) if has_fingerprint: # Fingerprinted resources are good forever (1 year)