almaan / stereoscope

Spatial mapping of cell types by integration of transcriptomics data
MIT License
87 stars 26 forks source link

test error #30

Open linhuawang opened 2 years ago

linhuawang commented 2 years ago

Hi,

Thanks for sharing the code. Following the guidance, my installation of stsc on a Linux server was successful. Running python3 -c "import stsc; print(stsc.__version__)" also gave me output as stereoscope : 0.2.0. However, when I run the test command with stereoscope test, I got an error saying: AttributeError: module 'stsc' has no attribute 'datasets'.

The full error message is also attached: Traceback (most recent call last): File "/home/alexw//.local/bin/stereoscope", line 33, in <module> sys.exit(load_entry_point('stereoscope==0.3.1', 'console_scripts', 'stereoscope')()) File "/home/alexw//.local/bin/stereoscope", line 25, in importlib_load_entry_point return next(matches).load() File "/home/alexw/.local/lib/python3.6/site-packages/importlib_metadata/__init__.py", line 105, in load module = import_module(match.group('module')) File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 665, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/alexw/.local/lib/python3.6/site-packages/stereoscope-0.3.1-py3.6.egg/stsc/__main__.py", line 4, in <module> from stsc.run import run File "/home/alexw/.local/lib/python3.6/site-packages/stereoscope-0.3.1-py3.6.egg/stsc/run.py", line 17, in <module> import stsc.fit as fit File "/home/alexw/.local/lib/python3.6/site-packages/stereoscope-0.3.1-py3.6.egg/stsc/fit.py", line 16, in <module> import stsc.datasets as D File "/home/alexw/.local/lib/python3.6/site-packages/stereoscope-0.3.1-py3.6.egg/stsc/datasets.py", line 14, in <module> import stsc.utils as utils File "/home/alexw/.local/lib/python3.6/site-packages/stereoscope-0.3.1-py3.6.egg/stsc/utils.py", line 17, in <module> import stsc.datasets as D AttributeError: module 'stsc' has no attribute 'datasets'.

Am I missing anything? Much appreciate it if you could help me resolve this issue. Thank you!

Best, Linhua

LucaJiang commented 2 years ago

I meet the same question in Python 3.6. Try to delete the "import stsc.datasets as D" in stsc/utils. Or use python 3.10+.