Your custom rule and the value of the static_url_path
parameter overlap. Rename one or the other.
You can easily use a different URL path for the static resources, for example:
app = Flask(__name__, static_url_path='/assets')
would set the URL path for static resources to /assets
; as long as you are using url_for('static', filename='path/to/static/asset')
in your Flask code and templates, that's all you need to do to avoid clashing.