Troubleshooting¶
Problems people run into, what causes them, and how to fix them. Skopia runs as two processes, a Python backend on port 8000 (pixi run backend) and the web frontend on port 5173 (pixi run dev); most startup problems come from one of the two not being ready, or from another program holding its port.
The app says the backend is "still starting up"¶
The first start of the backend in a freshly installed environment can take up to a minute while Python builds its caches for the scientific libraries; later starts take a few seconds. During that time the port is already open but not answering, so requests wait instead of failing. The frontend's terminal then warns that the backend at http://127.0.0.1:8000 is not reachable because it is still starting up (the port is open but not answering yet).
Fix: wait until the backend terminal prints Application startup complete., then reload the page.
If the message says nothing is listening there instead, the backend is not running. Start it with pixi run backend (or pixi run -e pyscn backend if you installed the PySingleCellNet environment).
Address already in use when starting the backend¶
Something already holds port 8000. Usually it is an earlier backend that is still running: uvicorn --reload keeps its parent process, and the port, alive even after the app inside it failed to import. A request to port 8000 that hangs has the same cause.
Fix: find the earlier run and stop it with Ctrl+C in its terminal. To see what is listening:
If the port belongs to another program you want to keep, run Skopia's backend on a different port and point the frontend at it:
The frontend on 5173 does not have this problem: if 5173 is taken, it picks the next free port and prints the address to open.
Unexpected token '<' or "answered skopia's API with HTML"¶
Another web server is answering on port 8000, so the app receives an HTML page where it expects JSON. Skopia recognizes this and names the intruder: A server calling itself "…" answered skopia's API with HTML instead of JSON. Development servers for other projects often use port 8000.
Fix: stop the other server (find it with the lsof command above), then start Skopia's backend. Or move Skopia's backend to another port as shown above.
The backend fails with "incompatible architecture"¶
The pixi environment was built for a different processor than the one running it: for example, a Skopia folder copied from an Intel Mac to an Apple Silicon Mac (or the reverse), or a terminal running under Rosetta. Compiled packages only load on the architecture they were built for.
Fix: check what you are on and which environment pixi uses:
uname -m # arm64 (Apple Silicon) or x86_64 (Intel)
pixi info # Platform, and the environment's Prefix location
Then move the folder .pixi/envs inside the Skopia directory to the Trash and reinstall, so the environments are built for this machine:
The frontend has the same issue with frontend/node_modules: errors such as You installed esbuild for another platform or Cannot find module @rollup/rollup-darwin-arm64 mean the folder came from another machine. Reinstall it with cd frontend && pixi run npm ci.
can't find Rust compiler while installing the pyscn environment¶
Older Skopia versions failed to install the PySingleCellNet environment on Intel Macs, because one dependency (gseapy) had no prebuilt package for that platform and pixi tried to compile it. Since v0.6.0 the Intel Mac build uses a prebuilt package. Fix: update Skopia (git pull, then pixi install -e pyscn).
PySingleCellNet: genes with underscores are dropped¶
PySingleCellNet encodes each gene pair as the string geneA_geneB and splits on _ to decode it, so gene names that contain an underscore cannot be represented. Training excludes them and says how many; if too few genes remain it stops and says so. The bundled toy dataset (toy_spatial.h5ad, genes named like Mesen_1) is exactly this case.
Fix: use a dataset with conventional gene symbols, or rename the genes first. See Cell typing.
Loading an .rds file fails¶
Skopia converts Seurat .rds files through R. This is optional and needs R with the Seurat and SeuratDisk packages, installed separately: SeuratDisk is not available as a conda package, so pixi cannot install it.
| Message | Cause |
|---|---|
| R is not installed. Install R and the Seurat/SeuratDisk packages to load .rds files. | Rscript is not on the path of the terminal that started the backend. |
| RDS conversion produced no output. Check that Seurat and SeuratDisk R packages are installed. | R runs, but a package is missing. |
| RDS conversion failed: followed by R's error | The conversion itself failed; R's message says why. |
If you have R but not SeuratDisk, saving the object as .h5ad from R or Python yourself is an alternative.
A Visium HD file is slow to load, or takes a lot of disk space¶
The first load of a 10x Visium HD *_feature_slice.h5 rebins the 2 µm data to 8 µm bins, which takes about 1 to 2 minutes. The result is cached as an .h5ad next to the source file, so later loads are fast. That cache can be around 1 GB. Delete it to reclaim the space; it is rebuilt on the next load. See Load your data.
Large datasets¶
- Coloring a large dataset left a blank page in versions before 0.6.0 (Chrome failed above about 125,000 cells when computing a color range). Update Skopia if you see this.
- Similarity ordering in the Expression heatmap clusters cells exactly up to 5,000 cells; above that it clusters 500 k-means centroids instead and says so in the toolbar. See Expression heatmaps and dot plots.
- Hierarchical clustering of CNV clones is refused above 20,000 cells, because it needs the full distance matrix; use Leiden clones instead. See Copy-number inference.
- The analysis record keeps the indices of a cell selection up to 50,000 cells; above that it keeps only the count, and the exported notebook cannot replay that selection. See Analysis record and notebook export.
- Operations that run in the background can be cancelled from their dialog. The cancel takes effect when the current computation step returns, so a single long step still runs to its end.
My work disappeared after restarting the backend¶
The backend holds the session in memory. Restarting it (or a code change that reloads it) clears every unsaved change: deleted cells, computed embeddings, clusters, drawn lines. Gene sets survive a browser reload, because they are kept on the backend, but not a backend restart. Fix: save the dataset as .h5ad before stopping the backend (see Save and export); the saved file carries your annotations, results, figures and analysis record.