app link: https://adityajadhavab-model-app-vs34k9.streamlit.app
github link: GitHub - adityajadhavab/model
PermissionError: This app has encountered an error.
app link: https://adityajadhavab-model-app-vs34k9.streamlit.app
github link: GitHub - adityajadhavab/model
PermissionError: This app has encountered an error.
PermissionError: [Errno 13] Permission denied: '/var/folders'
[20:04:22] Updated app!
2023-06-15 20:04:27.376 Uncaught app exception
Traceback (most recent call last):
File “/home/appuser/venv/lib/python3.9/site-packages/joblib/memory.py”, line 702, in _check_previous_func_code
self.store_backend.get_cached_func_code([func_id]))
File “/home/appuser/venv/lib/python3.9/site-packages/joblib/_store_backends.py”, line 266, in get_cached_func_code
with self._open_item(filename, ‘rb’) as f:
FileNotFoundError: [Errno 2] No such file or directory: ‘/var/folders/h9/b9hqt5sd69gc_yd08sw3y6tr0000gn/T/joblib/pycaret/internal/pipeline/_full_transform/func_code.py’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 565, in _run_script
exec(code, module.dict)
File “/app/model/app.py”, line 88, in
run()
File “/app/model/app.py”, line 62, in run
output = predict(model=model, input_df=input_df)
File “/app/model/app.py”, line 12, in predict
predictions_df = predict_model(model, data=input_df)
File “/home/appuser/venv/lib/python3.9/site-packages/pycaret/clustering/functional.py”, line 861, in predict_model
return experiment.predict_model(
File “/home/appuser/venv/lib/python3.9/site-packages/pycaret/clustering/oop.py”, line 98, in predict_model
return super().predict_model(estimator, data, ml_usecase)
File “/home/appuser/venv/lib/python3.9/site-packages/pycaret/internal/pycaret_experiment/unsupervised_experiment.py”, line 893, in predict_model
pred = estimator.predict(data)
File “/home/appuser/venv/lib/python3.9/site-packages/sklearn/utils/metaestimators.py”, line 113, in
out = lambda *args, **kwargs: self.fn(obj, *args, **kwargs) # noqa
File “/home/appuser/venv/lib/python3.9/site-packages/pycaret/internal/pipeline.py”, line 310, in predict
X, _ = self._memory_full_transform(self, X, None, with_final=False)
File “/home/appuser/venv/lib/python3.9/site-packages/joblib/memory.py”, line 594, in call
return self._cached_call(args, kwargs)[0]
File “/home/appuser/venv/lib/python3.9/site-packages/pycaret/internal/memory.py”, line 350, in _cached_call
self._check_previous_func_code(stacklevel=4)
File “/home/appuser/venv/lib/python3.9/site-packages/joblib/memory.py”, line 704, in _check_previous_func_code
self._write_func_code(func_code, first_line)
File “/home/appuser/venv/lib/python3.9/site-packages/joblib/memory.py”, line 656, in _write_func_code
self.store_backend.store_cached_func_code([func_id], func_code)
File “/home/appuser/venv/lib/python3.9/site-packages/joblib/_store_backends.py”, line 254, in store_cached_func_code
self.create_location(func_path)
File “/home/appuser/venv/lib/python3.9/site-packages/joblib/_store_backends.py”, line 351, in create_location
mkdirp(location)
File “/home/appuser/venv/lib/python3.9/site-packages/joblib/disk.py”, line 61, in mkdirp
os.makedirs(d)
File “/usr/local/lib/python3.9/os.py”, line 215, in makedirs
makedirs(head, exist_ok=exist_ok)
File “/usr/local/lib/python3.9/os.py”, line 215, in makedirs
makedirs(head, exist_ok=exist_ok)
File “/usr/local/lib/python3.9/os.py”, line 215, in makedirs
makedirs(head, exist_ok=exist_ok)
[Previous line repeated 5 more times]
File “/usr/local/lib/python3.9/os.py”, line 225, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: ‘/var/folders’
please help
The code for the app seems fine, it may be due to the pickle file of the saved model. Could you share a Jupyter notebook of how you built the model along with the data used to train the model which would help us to reproduce the model and error.
Normally, when I build and deploy an ML model, I would make sure that the library version used to build the model and the version used for deployed apps, should be the same.
Best regards,
Chanin
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.