supress_callback_exceptions = True 不再有效

supress_callback_exceptions = True no loger works

Dash 的旧版本中,我曾经需要能够说

supress_callback_exceptions = True

自从我升级到 Dash 的新版本后,现在我在该行收到错误消息:

Traceback (most recent call last):
  File "dash-yahoo_options.py", line 2109, in <module>
    app.config.supress_callback_exceptions = True
  File "/home/idf/anaconda3/envs/dash_apps_36/lib/python3.7/site-packages/dash/_utils.py", line 81, in __setattr__
    self[key] = value
  File "/home/idf/anaconda3/envs/dash_apps_36/lib/python3.7/site-packages/dash/_utils.py", line 106, in __setitem__
    raise AttributeError(final_msg, key)
AttributeError: ('Invalid config key. Some settings are only available via the Dash constructor', 'supress_callback_exceptions')
(dash_apps_36) idf@ubvm:~/Downloads$ vi dash-yahoo_options.py
(dash_apps_36) idf@ubvm:~/Downloads$ python dash-yahoo_options.py
Traceback (most recent call last):
  File "dash-yahoo_options.py", line 2109, in <module>
    app.config.supress_callback_exceptions = True
  File "/home/idf/anaconda3/envs/dash_apps_36/lib/python3.7/site-packages/dash/_utils.py", line 81, in __setattr__
    self[key] = value
  File "/home/idf/anaconda3/envs/dash_apps_36/lib/python3.7/site-packages/dash/_utils.py", line 106, in __setitem__
    raise AttributeError(final_msg, key)
AttributeError: ('Invalid config key. Some settings are only available via the Dash constructor', 'supress_callback_exceptions')

如果您在 Dash 更改日志中遗漏了它,这个拼写错误的后备方案已在 1.0.0 中删除。

配置属性应该仍然支持(如 1.6.0),你只需要使用正确的名称。

app.config.suppress_callback_exceptions = True