Hi there!
We have a feature in our streamlit application that imports a python library (dbt) and then utilizes that library to process data. This was working well as of last week. Over the weekend, we started getting an error saying:
FileNotFoundError: [Errno 2] No such file or directory: ‘dbt’
Traceback:
File "/home/adminuser/venv/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.__dict__)File "/mount/src/aero/app/⚙️_admin.py", line 154, in <module>
run_command(['dbt', 'deps'], cwd=dbt_dir, extra_env=env)File "/mount/src/aero/app/dbt_runner.py", line 18, in run_command
for i, line in enumerate(execute(args, cwd, my_env)):File "/mount/src/aero/app/dbt_runner.py", line 34, in execute
popen = subprocess.Popen(cmd, cwd=cwd, env=env, stdout=subprocess.PIPE, universal_newlines=True)File "/usr/local/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,File "/usr/local/lib/python3.8/subprocess.py", line 1720, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
Streamlit logs:
2023-07-31 14:38:24.170 | WARNING | error_util | error_util.py | handle_uncaught_app_exception() | 95 | Uncaught app exception
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.__dict__)
File "/mount/src/aero/app/⚙️_admin.py", line 154, in <module>
run_command(['dbt', 'deps'], cwd=dbt_dir, extra_env=env)
File "/mount/src/aero/app/dbt_runner.py", line 18, in run_command
for i, line in enumerate(execute(args, cwd, my_env)):
File "/mount/src/aero/app/dbt_runner.py", line 34, in execute
popen = subprocess.Popen(cmd, cwd=cwd, env=env, stdout=subprocess.PIPE, universal_newlines=True)
File "/usr/local/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/lib/python3.8/subprocess.py", line 1720, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'dbt'
We haven’t deployed any changes in the last week, so we’re trying to figure out where this is coming from and how to resolve, as it’s pretty core functionality to our product.
I’d prefer not to post our application publicly but happy to send a DM to someone investigating, or provide any more helpful information. I believe we’re on python 3.8 and confirmed we’re on Streamlit v1.21.0
Thanks!