Using nc_py_api I can't download any file due to SSL CERTIFICTE VERIFY FAILED

Hi, i’m trying to make a quick python tool to download files from my Client.

I’m using nc_py_api on Windows 10, i can log in creating the Nextcloud() class, but whenever i try to use the nc.files.download() function it gives me back this error:

httpx.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)

Does anyone have a solution for this? I tried to check the framework code to avoid SSL verification as for the older library (nextcloud_client)

Thanks!

What happens if you set NPA_NC_CERT to false?

https://cloud-py-api.github.io/nc_py_api/Options.html

1 Like

Hi jtr,

sorry for the late reply, i can now log in to Nextcloud, but every operation a try to make such as getting or dowloading files i get this error:

nc_py_api._exceptions.NextcloudException: [401] Unauthorized <request: GET /ocs/v1.php/cloud/user>

i’m trying to figure out what can possibly solve this, idk why it gets me the “Unauthorized” error, do you know any workaround to avoid this?

Thank you so much for your help!