PodBrowser - Failed to load resource: the server responded with a status of 404 (Not Found)

Hi, I’m trying to access files using the PodBrowser but I consistently get errors when trying to access my files as seen below

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.

There must be a podBrowser issue. Is the podBrowser able to display .csv ?
I have no problem accessing them with Google Chrome.

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

1 Like

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.

So I’m essentially following the bottom bit of this page (https://github.com/twonote/solid-file-python/blob/master/solid-file-python-getting-start.ipynb) - the “Access private resources” section. I’m then using the Python requests package to retrieve the file via URL. I then want to write the contents of the file to a new file locally.

    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.

How do I go about setting explicit permissions? Just to note that I am creating files via Python

...
FILE_NAME = f"{datetime.now().strftime('%Y-%m-%d')}.csv"
file_url = aqm_folder_url + FILE_NAME

self.api.put_file(file_url, csv_header, FILE_CONTENT_TYPE)
print(f"Created AQM data file at '{file_url}', with header\'{csv_header}'.")

Yes after investigating further, it is indeed a problem with the .acl file.

The csv file is ok.