czbiohub-sf / Rapid-QC-MS

Realtime quality control for mass spectrometry data acquisition
https://czbiohub-sf.github.io/Rapid-QC-MS
Other
15 stars 2 forks source link

Flask error - 2.3.x removed before_first_request #76

Closed InventoRyAlpaca closed 1 year ago

InventoRyAlpaca commented 1 year ago

After successfully installing via 'pip install ms-autoqc' trying to run resulted in the following error.

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\ira.gray\ms-autoqc-venv\autoqcvenv\Scripts\ms_autoqc.exe\__main__.py", line 4, in <module>
  File "C:\Users\ira.gray\ms-autoqc-venv\autoqcvenv\Lib\site-packages\ms_autoqc\__main__.py", line 1, in <module>
    from ms_autoqc.DashWebApp import *
  File "C:\Users\ira.gray\ms-autoqc-venv\autoqcvenv\Lib\site-packages\ms_autoqc\DashWebApp.py", line 47, in <module>
    app = dash.Dash(__name__, title="MS-AutoQC", suppress_callback_exceptions=True,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ira.gray\ms-autoqc-venv\autoqcvenv\Lib\site-packages\dash\dash.py", line 501, in __init__
    self.init_app()
  File "C:\Users\ira.gray\ms-autoqc-venv\autoqcvenv\Lib\site-packages\dash\dash.py", line 545, in init_app
    self.server.before_first_request(self._setup_server)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Flask' object has no attribute 'before_first_request'. Did you mean: '_got_first_request'?

Googling landed me at this issue: https://github.com/DataDog/dd-trace-py/issues/5671

temporary workaround solution was to just downgrade the flask version by running 'pip install flask==2.2.4'