{"slug": "runtimeerror-no-cuda-gpus-are-available-and-valueerror", "title": "RuntimeError: No CUDA GPUs are available and ValueError", "summary": "A user named Stormpie reported on a forum that their pottery dating machine 'terraID' fails with 'RuntimeError: No CUDA GPUs are available' when clicking the 'Analyze' button, despite the app running on CPU at startup. The application log shows a corrupted classifier file 'museum_classifier_v5.pt' was detected and retrained, achieving 45.7% validation accuracy on 490 memory examples, and a subsequent 'ValueError: Invalid file descriptor: -1' occurred during shutdown.", "body_md": "Hello everyone, this is my first post on this forum. I made a pottery dating machine. The space is called ‘terraID’. However, whenever I click the ‘Analyze’ button, I keep getting the error that there are No CUDA GPUs are available. I tried everything(yes, import Spaces is the first line of the app.py). Is there anyone who knows how this problem can be solved?There is also a ValueError that I can’t quite figure out. My username is ‘Stormpie’.\n\nThanks in advance for the help!\n\n===== Application Startup at 2026-09-07 08:25:26 =====\n\n# \n\n[notice] To update, run: pip install --upgrade pip\n\n# \n\n# \n\nDevice at startup: CPU\n\nCLIP: lazy-loaded on ZeroGPU request\n\n Imported 490 memory examples from museum_memory.json\n\n FAISS memory rebuilt: 490 vectors\n\n Could not load classifier: PytorchStreamReader failed reading zip archive: unsupported multidisk archive. This is an internal miniz error. If you are seeing this error, there is a high likelihood that your checkpoint file is corrupted. This can happen if the checkpoint was not saved properly, was transferred incorrectly, or the file was modified after saving.\n\n Corrupt classifier moved to: museum_classifier_v5.pt.corrupt\n\n Training classifier from existing memory…\n\nEpoch 001/60 val=11.7%\n\nEpoch 010/60 val=21.3%\n\nEpoch 020/60 val=27.7%\n\nEpoch 030/60 val=30.9%\n\nEpoch 040/60 val=35.1%\n\nEpoch 050/60 val=40.4%\n\nEpoch 060/60 val=44.7%\n\n Classifier checkpoint saved: museum_classifier_v5.pt\n\nClassifier getraind. Validation accuracy: 45.7%. Training: 396, validation: 94.\n\n### \n\n**Totaal:** 490 voorbeelden\n\n1. **ca. 5300-2000 v.Chr.** — 64\n2. **2000-0 v.Chr** — 73\n3. **0-400 n.Chr** — 79\n4. **400-1200 n.Chr** — 73\n5. **1200-1500 n.Chr** — 35\n6. **1500-1700 n.Chr** — 73\n7. **1700-1899 n.Chr** — 52\n8. **1900-nu n.Chr** — 41\n\n**FAISS vectors:** 490\n\n**Validation accuracy:** 45.7%\n\n* Running on local URL:  [http://0.0.0.0:7860](http://0.0.0.0:7860), with SSR  (Node proxy → Python :7861)\n\nException ignored in: <function BaseEventLoop._*del*_ at 0x7fb288bc09a0>\n\nTraceback (most recent call last):\n\nFile “/usr/local/lib/python3.12/asyncio/base_events.py”, line 732, in _*del*_\n\nself.close()\n\nFile “/usr/local/lib/python3.12/asyncio/unix_events.py”, line 68, in close\n\nsuper().close()\n\nFile “/usr/local/lib/python3.12/asyncio/selector_events.py”, line 104, in close\n\nself._close_self_pipe()\n\nFile “/usr/local/lib/python3.12/asyncio/selector_events.py”, line 111, in _close_self_pipe\n\nself._remove_reader(self._ssock.fileno())\n\nFile “/usr/local/lib/python3.12/asyncio/selector_events.py”, line 298, in _remove_reader\n\nkey = self._selector.get_key(fd)\n\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nFile “/usr/local/lib/python3.12/selectors.py”, line 190, in get_key\n\nreturn mapping[fileobj]\n\n~~~~~~~^^^^^^^^^\n\nFile “/usr/local/lib/python3.12/selectors.py”, line 71, in _*getitem*_\n\nfd = self._selector._fileobj_lookup(fileobj)\n\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nFile “/usr/local/lib/python3.12/selectors.py”, line 225, in _fileobj_lookup\n\nreturn _fileobj_to_fd(fileobj)\n\n^^^^^^^^^^^^^^^^^^^^^^^\n\nFile “/usr/local/lib/python3.12/selectors.py”, line 42, in _fileobj_to_fd\n\nraise ValueError(“Invalid file descriptor: {}”.format(fd))\n\nValueError: Invalid file descriptor: -1\n\nException ignored in: <function BaseEventLoop._*del*_ at 0x7fb288bc09a0>\n\nTraceback (most recent call last):\n\nFile “/usr/local/lib/python3.12/asyncio/base_events.py”, line 732, in _*del*_\n\nself.close()\n\nFile “/usr/local/lib/python3.12/asyncio/unix_events.py”, line 68, in close\n\nsuper().close()\n\nFile “/usr/local/lib/python3.12/asyncio/selector_events.py”, line 104, in close\n\nself._close_self_pipe()\n\nFile “/usr/local/lib/python3.12/asyncio/selector_events.py”, line 111, in _close_self_pipe\n\nself._remove_reader(self._ssock.fileno())\n\nFile “/usr/local/lib/python3.12/asyncio/selector_events.py”, line 298, in _remove_reader\n\nkey = self._selector.get_key(fd)\n\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nFile “/usr/local/lib/python3.12/selectors.py”, line 190, in get_key\n\nreturn mapping[fileobj]\n\n~~~~~~~^^^^^^^^^\n\nFile “/usr/local/lib/python3.12/selectors.py”, line 71, in _*getitem*_\n\nfd = self._selector._fileobj_lookup(fileobj)\n\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nFile “/usr/local/lib/python3.12/selectors.py”, line 225, in _fileobj_lookup\n\nreturn _fileobj_to_fd(fileobj)\n\n^^^^^^^^^^^^^^^^^^^^^^^\n\nFile “/usr/local/lib/python3.12/selectors.py”, line 42, in _fileobj_to_fd\n\nraise ValueError(“Invalid file descriptor: {}”.format(fd))\n\nValueError: Invalid file descriptor: -1\n\n* To create a public link, set `share=True` in `launch()`.\n\nTraceback (most recent call last):\n\nFile “/usr/local/lib/python3.12/site-packages/spaces/zero/wrappers.py”, line 148, in worker_init\n\ntorch.init(nvidia_uuid)\n\nFile “/usr/local/lib/python3.12/site-packages/spaces/zero/torch/patching.py”, line 417, in init\n\ntorch.Tensor([0]).cuda()\n\nFile “/usr/local/lib/python3.12/site-packages/torch/cuda/_*init*_.py”, line 478, in _lazy_init\n\ntorch._C._cuda_init()\n\nRuntimeError: No CUDA GPUs are available", "url": "https://wpnews.pro/news/runtimeerror-no-cuda-gpus-are-available-and-valueerror", "canonical_source": "https://discuss.huggingface.co/t/runtimeerror-no-cuda-gpus-are-available-and-valueerror/180008#post_2", "published_at": "2026-09-07 10:45:38+00:00", "updated_at": "2026-09-07 11:25:52.862513+00:00", "lang": "en", "topics": ["artificial-intelligence", "machine-learning"], "entities": ["Stormpie", "terraID", "CUDA", "FAISS", "CLIP"], "alternates": {"html": "https://wpnews.pro/news/runtimeerror-no-cuda-gpus-are-available-and-valueerror", "markdown": "https://wpnews.pro/news/runtimeerror-no-cuda-gpus-are-available-and-valueerror.md", "text": "https://wpnews.pro/news/runtimeerror-no-cuda-gpus-are-available-and-valueerror.txt", "jsonld": "https://wpnews.pro/news/runtimeerror-no-cuda-gpus-are-available-and-valueerror.jsonld"}}