Skip to content

4 Getting Help

johaGL edited this page Oct 15, 2026 · 1 revision

Get Help

Contact


Common Issues and Solutions

Installation Issues

Problem: ModuleNotFoundError: No module named 'SpacePath'

🔹 Solution: Ensure you:

  1. Installed with poetry install (not just git clone)
  2. Activated the environment: conda activate spacepath or source spacepath/bin/activate

Problem: ModuleNotFoundError: No module named 'sspa'

🔹 Solution: This dependency is installed with:

pip install sspa==1.0.4

Data Loading Issues

Problem: annots_obj.no_translated is empty after .load()

🔹 Solution: Check that:

  1. File paths are correct (relative to data_dir + subfolder)
  2. CSV delimiter matches your file (default is comma ,)
  3. Required columns exist: mz, formula, moleculeIds, moleculeNames
  4. Column names are exact (case-sensitive)

Problem: FileNotFoundError when loading annotations

🔹 Solution: Verify your folder structure:

import os
print(os.path.exists(os.path.join(data_dir, subfolder, "your-file.csv")))

Problem: annots_obj.df is empty after .convert_ids_to_kegg()

🔹 Solution:

  • Ensure your annotation database (HMDB, LipidMaps) has matching entries in the reference mapping files
  • Check that the mapping files contain entries for your compound IDs

Performance Issues

Problem: ClassifyMZProtocol.run() is very slow

🔹 Solution: For large datasets (>50k spots), you can:

  1. Reduce permutations: e.g. set n_perms_moran_calc=10 in config
  2. The computation automatically splits into groups for very large datasets

Problem: Multiple log files appearing in logs/ folder

🔹 Solution: This can happen with repeated imports in Jupyter notebooks. Restart your kernel to reset the logger state.

Computation Issues

Problem: ArpackError during pathway scores computation

🔹 Solution: This occurs when input data has zero-variance columns. The library handles this automatically, but if it persists:

  1. Check for columns with all-zero values in your data
  2. Filter out low-variance features before computation

Reporting Bugs

When reporting issues, please include:

  1. Python version (python --version)
  2. SpacePath version (check pyproject.toml)
  3. Full error traceback
  4. Minimal code to reproduce the issue
  5. Sample of your input data format (anonymized if needed)

Clone this wiki locally