I was using sentinel hub OGC API to download some Sentinel 2A products and was using Jupiter notebook to download the data. As a process I mention my configuration id that gives access to the data layer and then call for the download request. It was working perfectly fine until today when I upgraded the sentinel hub library in python 3.9 and now its constantly throwing the error of permission denied (Err no 13)
still same error William, its not even allowing me to touch the config file or do any changes in them. but this same things works completely on a different windows computer and without specifically mentioning the client id
OK I don’t have enough knowledge of the permissions and settings that are on your system. Can you confirm your operating system and environment please, I am confused as you mention Windows but your screenshot is from Mac OS.
yes I am working on macOS Monterey, version 12.0.1. Also I am using python 3.9 to download data from sentinel hub WCS layers. I have been doing this since last year and never have I faced any problem. Today morning, I was showing it to one of my colleagues who has a windows system and it ran completely fine on his laptop.
during the same time, I accidentally upgraded sentinel hub and since then I am facing this issue. I tried uninstalling and reinstalling sentinel hub again, but the moment I call sentinel hub as a library, it says the permission is denied.
# Set up configuration tool
config = SHConfig()
if not config.sh_client_id or not config.sh_client_secret:
print("Warning! To use Process API, please provide the credentials (OAuth client ID and client secret).")
Running the below cell will return your configuration (don’t share this in the public forum). If your client id and client secret are empty you will need reenter these credentials.
Hi @jagriti, in the recent update the configuration file was moved to the ~/.config/sentinelhub/config.toml, and, judging by the error, your python process seems to not have permissions to access/modify it.
To avoid you having issues, here is a possible workaround:
config = SHConfig(use_defaults=True)
# this will completely ignore looking into the file
# so the permission error should go away
config.instance_id = "somethingsomething"
You then have to pass this config around explicitly, any method that will be called without config=config might try to call SHConfig() inside and crash. So this is clearly just a temporary workaround so you can continue your work.
Looking at your full stack-trace, it could just be that the process does not have sufficient permissions to CREATE things. So try creating the following manually:
create the folder .config in /Users/jagriti/, inside create a folder sentinelhub
in /Users/jagriti/.config/sentinelhub/ create a file named config.toml
put the following in the config file (filling in the appropriate credentials ofcourse):