{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreibuhtm2ymfu5kpmvwine2oeggvpuxuccnur4f5d6as3p2yt5tlku4",
"uri": "at://did:plc:pgryn3ephfd2xgft23qokfzt/app.bsky.feed.post/3miw2wnyenxy2"
},
"path": "/t/spaces-persistent-storage-upgrade-not-accessible/171226#post_19",
"publishedAt": "2026-04-07T11:48:55.000Z",
"site": "https://discuss.huggingface.co",
"textContent": "I have two python-gradio spaces that use persistent storage, which I have converted to use buckets.\n\nTo access stored files my python code does this:\n\n> from pathlib import Path\n>\n> dp = Path(‘/data’)\n> dp.mkdir(exist_ok=True)\n> dataDir = ‘/data/’\n>\n> foo_path = dataDir + ‘foo.txt’\n>\n> with open(foo_path, ‘rt’) as fp:\n>\n>\n> lines = fp.readlines()\n>\n>\n> # etc.\n\nThis worked fine under the old presistent storage system. And it worked fine after I set up a mounted bucket in settings with\n\n> /data\n\nas the path. BUT only for several hours. Now I’m getting input/output errors (errno 5) when attempting to access the bucket files. Buckets are public if that makes a difference. And the files I expect to be in the bucket are there.\n\nI’m now doing factory rebuilds on the two spaces and they’re both stuck on restarting.\nNow one of them says runtime error: Scheduling failure: unable to schedule (???)\n\nAnd other says runtime error: Error: BodyStreamBuffer was aborted (???)\n\nthese errors are in the Container log.\n\nI wonder if the mkdir call is a problem because the bucket is already mounted?\n\nOr do I need a completely different method to access the bucket in Python?",
"title": "Spaces Persistent Storage Upgrade Not Accessible"
}