MannLabs / alphapept

A modular, python-based framework for mass spectrometry. Powered by nbdev.
https://mannlabs.github.io/alphapept/
Apache License 2.0
168 stars 31 forks source link

FileWatcher setup fails with error AttributeError: module 'streamlit' has no attribute 'script_runner' #460

Closed heuselm closed 2 years ago

heuselm commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

FileWatcher setup fails with error AttributeError: module 'streamlit' has no attribute 'script_runner' Traceback: File "streamlit\scriptrunner\script_runner.py", line 475, in _run_script exec(code, module.dict) File "C:\Program Files (x86)\AlphaPept\alphapept\webui.py", line 46, in sidebar[menu]() File "alphapept\gui\filewatcher.py", line 222, in filewatcher raise st.script_runner.RerunException(

To Reproduce Steps to reproduce the behavior:

  1. Go to http://localhost:8505/
  2. Click on FileWatcher, configure folder to watch
  3. Press start
  4. See error

Expected behavior File watcher to start and files arriving in the watched folder to be added to the processing queue.

Screenshots If applicable, add screenshots to help explain your problem.

image

Version (please complete the following information):

Additional context


Local URL: http://localhost:8505 Network URL: [removed]

2022-06-10 15:08:09.437 INFO numexpr.utils: Note: NumExpr detected 64 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8. 2022-06-10 15:08:09.437 INFO numexpr.utils: NumExpr defaulting to 8 threads. 2022-06-10 15:08:10.611 INFO matplotlib.font_manager: generated new fontManager 2022-06-10 15:08:15.656 INFO root: Using existing settings. 2022-06-10 15:08:15.686 INFO root: Cupy is not available 2022-06-10 15:08:15.686841 Started queue_watcher 2022-06-10 15:16:47.018 Traceback (most recent call last): File "streamlit\scriptrunner\script_runner.py", line 475, in _run_script exec(code, module.dict) File "C:\Program Files (x86)\AlphaPept\alphapept\webui.py", line 46, in sidebar[menu]() File "alphapept\gui\filewatcher.py", line 222, in filewatcher raise st.script_runner.RerunException() AttributeError: module 'streamlit' has no attribute 'script_runner' 2022-06-10 15:16:47.966 INFO numexpr.utils: Note: NumExpr detected 64 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8. 2022-06-10 15:16:47.966 INFO numexpr.utils: NumExpr defaulting to 8 threads. 2022-06-10 15:16:49.106 INFO matplotlib.font_manager: generated new fontManager 2022-06-10 15:16:53.886 INFO root: Using existing settings. 2022-06-10 15:16:53.886314 file watcher started.

straussmaximilian commented 2 years ago

Thanks for reporting. The error is indeed caused by a new streamlit version. I will include it in the next version. Just to confirm: Are no files added to the queue? In principle, the error should not prevent the watcher from starting.