Hi everyone! I am trying to publish my streamlit app and am running into the error:
PermissionError: [Errno 13] Permission denied: '/mount/src/fireoccurrenceprediction/lightning/weather/cf-build-AB.exe'During handling of the above exception, another exception occurred:Traceback (most recent call last): File "/usr/local/lib/python3.9/multiprocessing/pool.py", line 125, in worker result = (True, func(*args, **kwds)) File "/mount/src/fireoccurrenceprediction/Home.py", line 147, in runHumanFOPModel raise Exception(e)Exception: [Errno 13] Permission denied: '/mount/src/fireoccurrenceprediction/lightning/weather/cf-build-AB.exe'"""The above exception was the direct cause of the following exception:Traceback (most recent call last): File "/mount/src/fireoccurrenceprediction/Home.py", line 356, in run_human_fop_model result.get() File "/usr/local/lib/python3.9/multiprocessing/pool.py", line 771, in get raise self._valueException: [Errno 13] Permission denied: '/mount/src/fireoccurrenceprediction/lightning/weather/cf-build-AB.exe'
My code uses a mix of python and C files and I am attempting to call the C executable cf-build-AB.exe which is raising the permission error.
from lightning import LightningFireOccurrencePrediction
from human import HumanFireOccurrencePrediction
And then in the HumanFireOccurrencePrediction Class
# Build the path to the C weather interpolation executable.
self.weather_interpolation_exe_path = \
os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'FireOccurrencePrediction\\lightning\\weather\\cf-build-AB.exe'))
# Build the path to the C weather binning executable.
self.weather_binning_exe_path = \
os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'FireOccurrencePrediction\\lightning\\weather\\use_cf2.exe'))
def weatherInterpolationBinnerWrapper(self):
""" Calls the wrapped weather interpolation and binning tools, feeding it the massaged weather data.
Here, we use subprocess.call as opposed to subprocess.Popen because subprocess.call
is blocking; we need the external call to finish before we carry on with other stages of
the processing flow. """
# print("weatherInterpolationBinnerWrapper(): Calling weather interpolation exe...")
# print("weatherInterpolationBinnerWrapper(): self.hmn_weather_interpolation_coefficients_path is %s" % self.hmn_weather_interpolation_coefficients_path)
subprocess.call([self.weather_interpolation_exe_path, self.hmn_weather_massaged_output_path, self.hmn_weather_interpolation_coefficients_path])
# print("weatherInterpolationBinnerWrapper(): Weather interpolation exe call completed.")
# print("weatherInterpolationBinnerWrapper(): Calling weather binner exe...")
subprocess.call([self.weather_binning_exe_path, self.hmn_weather_binned_output_path, self.hmn_grid_locations_path, self.hmn_weather_interpolation_coefficients_path])
# print("weatherInterpolationBinnerWrapper(): Weather binning exe call completed.")
Hello I am having the following error on my published streamlit App:
PermissionError: [Errno 13] Permission denied: '/mount/src/fireoccurrenceprediction/lightning/weather/cf-build-AB.exe'During handling of the above exception, another exception occurred:Traceback (most recent call last): File "/usr/local/lib/python3.9/multiprocessing/pool.py", line 125, in worker result = (True, func(*args, **kwds)) File "/mount/src/fireoccurrenceprediction/Home.py", line 147, in runHumanFOPModel raise Exception(e)Exception: [Errno 13] Permission denied: '/mount/src/fireoccurrenceprediction/lightning/weather/cf-build-AB.exe'"""The above exception was the direct cause of the following exception:Traceback (most recent call last): File "/mount/src/fireoccurrenceprediction/Home.py", line 356, in run_human_fop_model result.get() File "/usr/local/lib/python3.9/multiprocessing/pool.py", line 771, in get raise self._valueException: [Errno 13] Permission denied: '/mount/src/fireoccurrenceprediction/lightning/weather/cf-build-AB.exe'
My code contains both C and Python files. I am attempting to use my executable C file cf-build-AB.exe but am getting a permission error. Note that the code works locally just not on the published App.
# Build the path to the C weather interpolation executable.
self.weather_interpolation_exe_path = \
os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'FireOccurrencePrediction\\lightning\\weather\\cf-build-AB.exe'))
# Build the path to the C weather binning executable.
self.weather_binning_exe_path = \
os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'FireOccurrencePrediction\\lightning\\weather\\use_cf2.exe'))
def weatherInterpolationBinnerWrapper(self):
""" Calls the wrapped weather interpolation and binning tools, feeding it the massaged weather data.
Here, we use subprocess.call as opposed to subprocess.Popen because subprocess.call
is blocking; we need the external call to finish before we carry on with other stages of
the processing flow. """
# print("weatherInterpolationBinnerWrapper(): Calling weather interpolation exe...")
# print("weatherInterpolationBinnerWrapper(): self.hmn_weather_interpolation_coefficients_path is %s" % self.hmn_weather_interpolation_coefficients_path)
subprocess.call([self.weather_interpolation_exe_path, self.hmn_weather_massaged_output_path, self.hmn_weather_interpolation_coefficients_path])
# print("weatherInterpolationBinnerWrapper(): Weather interpolation exe call completed.")
# print("weatherInterpolationBinnerWrapper(): Calling weather binner exe...")
subprocess.call([self.weather_binning_exe_path, self.hmn_weather_binned_output_path, self.hmn_grid_locations_path, self.hmn_weather_interpolation_coefficients_path])
# print("weatherInterpolationBinnerWrapper(): Weather binning exe call completed.")
Hi Everyone! I am trying to publish my streamlit App and am running into the error
PermissionError: [Errno 13] Permission denied: '/mount/src/fireoccurrenceprediction/lightning/weather/cf-build-AB.exe'During handling of the above exception, another exception occurred:Traceback (most recent call last): File "/usr/local/lib/python3.9/multiprocessing/pool.py", line 125, in worker result = (True, func(*args, **kwds)) File "/mount/src/fireoccurrenceprediction/Home.py", line 147, in runHumanFOPModel raise Exception(e)Exception: [Errno 13] Permission denied: '/mount/src/fireoccurrenceprediction/lightning/weather/cf-build-AB.exe'"""The above exception was the direct cause of the following exception:Traceback (most recent call last): File "/mount/src/fireoccurrenceprediction/Home.py", line 356, in run_human_fop_model result.get() File "/usr/local/lib/python3.9/multiprocessing/pool.py", line 771, in get raise self._valueException: [Errno 13] Permission denied: '/mount/src/fireoccurrenceprediction/lightning/weather/cf-build-AB.exe'
My code uses a mix of python and C files and the error is raised when I call the executable cf-build-AB.exe (which is the exe of my C file) in my code. If anyone has any ideas of why this error is occurring the help would be greatly appreciated!
My code portion that associates with the error is below
starting in Home.py:
from lightning import LightningFireOccurrencePrediction
from human import HumanFireOccurrencePrediction
and in HumanFireOccurrencePrediction:
self.weather_interpolation_exe_path = \
os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'FireOccurrencePrediction\\lightning\\weather\\cf-build-AB.exe'))
# Build the path to the C weather binning executable.
self.weather_binning_exe_path = \
os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'FireOccurrencePrediction\\lightning\\weather\\use_cf2.exe'))
def weatherInterpolationBinnerWrapper(self):
""" Calls the wrapped weather interpolation and binning tools, feeding it the massaged weather data.
Here, we use subprocess.call as opposed to subprocess.Popen because subprocess.call
is blocking; we need the external call to finish before we carry on with other stages of
the processing flow. """
# print("weatherInterpolationBinnerWrapper(): Calling weather interpolation exe...")
# print("weatherInterpolationBinnerWrapper(): self.hmn_weather_interpolation_coefficients_path is %s" % self.hmn_weather_interpolation_coefficients_path)
subprocess.call([self.weather_interpolation_exe_path, self.hmn_weather_massaged_output_path, self.hmn_weather_interpolation_coefficients_path])
# print("weatherInterpolationBinnerWrapper(): Weather interpolation exe call completed.")
# print("weatherInterpolationBinnerWrapper(): Calling weather binner exe...")
subprocess.call([self.weather_binning_exe_path, self.hmn_weather_binned_output_path, self.hmn_grid_locations_path, self.hmn_weather_interpolation_coefficients_path])
# print("weatherInterpolationBinnerWrapper(): Weather binning exe call completed.")
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
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.
Performance cookies
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.
Functional cookies
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.
Targeting cookies
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.