[TypeError] - Docker Run
saisomesh2594 opened this issue · comments
Hi,
I am trying to execute this using Docker from my Windows 10 laptop. I am using the latest TAG (0.8.4) with the following command:
docker run quay.io/biocontainers/scelvis:0.8.4--py_0 scelvis run --data-source hgmm_1k.h5ad
And, the following is the output I get:
[I 200405 17:44:58 webserver:47] Starting Dash web server on 0.0.0.0:8050
[I 200405 17:44:58 webserver:50] Using cache directory /tmp/scelvis.cache.vexpx3xt
[I 200405 17:44:58 webserver:39] Creating upload directory /tmp/scelvis.uploadcmhd1bj2
[I 200405 17:44:58 webserver:24] Creating temporary directory /tmp/scelvis.tmpeewr5e7s
[I 200405 17:45:03 cache:23] Using cache configuration {'DEBUG': False, 'CACHE_TYPE': 'filesystem', 'CACHE_DEFAULT_TIMEOUT': 604800, 'CACHE_DIR': '/tmp/scelvis.cache.vexpx3xt', 'CACHE_REDIS_URL': None}
[I 200405 17:45:03 store:131] Loading single dataset from data source file:///hgmm_1k.h5ad
[I 200405 17:45:03 data:253] Loading anndata for hgmm_1k from file:///hgmm_1k.h5ad
Traceback (most recent call last):
File "/usr/local/bin/scelvis", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/scelvis/cli.py", line 57, in main
return cmds[args.cmd](args, parser)
File "/usr/local/lib/python3.7/site-packages/scelvis/webserver.py", line 109, in run
run_cache_dir(args)
File "/usr/local/lib/python3.7/site-packages/scelvis/webserver.py", line 52, in run_cache_dir
run_upload_dir(args)
File "/usr/local/lib/python3.7/site-packages/scelvis/webserver.py", line 41, in run_upload_dir
run_temp_dir(args)
File "/usr/local/lib/python3.7/site-packages/scelvis/webserver.py", line 26, in run_temp_dir
run_server(args)
File "/usr/local/lib/python3.7/site-packages/scelvis/webserver.py", line 16, in run_server
from .app import app # noqa
File "/usr/local/lib/python3.7/site-packages/scelvis/app.py", line 72, in <module>
app.layout = build_layout()
File "/usr/local/lib/python3.7/site-packages/scelvis/ui/main.py", line 247, in build_layout
render_navbar(),
File "/usr/local/lib/python3.7/site-packages/scelvis/ui/main.py", line 85, in render_navbar
children=render_children_goto(),
File "/usr/local/lib/python3.7/site-packages/scelvis/ui/main.py", line 109, in render_children_goto
metas = store.load_all_metadata()
File "/usr/local/lib/python3.7/site-packages/flask_caching/__init__.py", line 779, in decorated_function
rv = f(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/scelvis/store.py", line 133, in load_all_metadata
result.append(_load_data_cached(url, identifier).metadata)
File "/usr/local/lib/python3.7/site-packages/flask_caching/__init__.py", line 779, in decorated_function
rv = f(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/scelvis/store.py", line 115, in _load_data_cached
return data.load_data(url, identifier)
File "/usr/local/lib/python3.7/site-packages/scelvis/data.py", line 255, in load_data
ad = anndata.read_h5ad(path_anndata)
File "/usr/local/lib/python3.7/site-packages/anndata/_io/h5ad.py", line 400, in read_h5ad
with h5py.File(filename, "r") as f:
File "/usr/local/lib/python3.7/site-packages/h5py/_hl/files.py", line 385, in __init__
name = filename_encode(name)
File "/usr/local/lib/python3.7/site-packages/h5py/_hl/compat.py", line 111, in filename_encode
filename = fspath(filename)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Any help would be appreciated.
Thanks,
Somesh
Hi Somesh,
thanks for trying out SCelVis. The error means that the tool didn't find any dataset (we should make this error message more informative). You need to tell docker where exactly your data is (with a full path) because it will mount that folder into the container. so the command should be like this
docker run -p 8050:8050 -v /path/to/data:/data quay.io/biocontainers/scelvis:0.8.4--py_0 scelvis run --data-source /data/hgmm_1k.h5ad
does that make sense?
Best,
Benedikt
Hi Benedikt,
Thanks for the quick response. Your suggestion in addition to tweaking some docker settings in Windows 10 managed to fix this and this works like a charm!
Thanks,
Somesh