The Pod above I’m using is the SolidCommunity net. I have tested with other Pod Providers:
PodInrupt net - always get error
PodInrupt com - never get error
Unfortunately I have to use SolidCommunity Pod as it is the only one that supports accessing private resources via Python SOLID API which is what I require.
If anyone could offer any assistance it would be greatly appreciated.
If you look closely at the error, it shows that a ...07-11.csv.acl file is not found. This is normal behaviour if it doesn’t have explicit permissions set (ie it inherits the permissions from some parent folder).
So if there is a bug, it is not necessarily related to those 404s
I don’t really understand what you try to do here and what exactly fails. Can you elaborate the steps to reproduce, what was expected, and what happened instead?
I don’t think we try to grab it as a .csv there, it looks like it’s failing when accessing the ACLs, as others have mentioned. I just tried accessing a CSV file via podbrowser after uploading one to an account on https://login.inrupt.com (see: https://inrupt.com/blog/pod-spaces-upgrade), and it worked fine.
from solid.solid_api import SolidAPI
import requests
# I know this is bad practice, will use a .env file. Just using for testing.
USERNAME = "henryprosser"
PASSWORD = "password"
PRIVATE_RES = (
"https://henryprosser.solidcommunity.net/aqm-data/aqm1/2022-07-14.csv"
)
IDP = "https://henryprosser.solidcommunity.net/"
auth = Auth()
api = SolidAPI(auth)
auth.login(IDP, USERNAME, PASSWORD)
resp = api.get(PRIVATE_RES)
# Trying to access file via URL
response = requests.get(PRIVATE_RES)
print(response)
# Writing contents of file to new file locally
file_name = "2022-07-14.csv"
open(file_name, "wb").write(response.content)
If I can access the file, I get <Response [200]> and it writes to a new file as expected. Else I get a <Response [401]> and it does not write successfully. I couldn’t work out why some Pod files worked and others didn’t (I originally thought it was having problems accessing all my files in my Solid Pod) then I realised the ones I was getting 401 responses were the files where I’m getting the error outlined in my first post and it just keeps loading on the pod browser.