linnarsson-lab / loom-viewer

Tool for sharing, browsing and visualizing single-cell data stored in the Loom file format
BSD 2-Clause "Simplified" License
35 stars 6 forks source link

loom-viewer doesn't open #166

Open MahdiMoradiMarjaneh opened 4 years ago

MahdiMoradiMarjaneh commented 4 years ago

Hello,

I've recently installed loom-viewer through pip and Anaconda3. When running loom I get this error:

ERROR:loom_viewer.loom_server:Exception on / [GET] Traceback (most recent call last): File "/rds/general/user/mmoradim/home/anaconda3/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app response = self.full_dispatch_request() File "/rds/general/user/mmoradim/home/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request rv = self.handle_user_exception(e) File "/rds/general/user/mmoradim/home/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception reraise(exc_type, exc_value, tb) File "/rds/general/user/mmoradim/home/anaconda3/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise raise value File "/rds/general/user/mmoradim/home/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request rv = self.dispatch_request() File "/rds/general/user/mmoradim/home/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request return self.view_functionsrule.endpoint File "/rds/general/user/mmoradim/home/anaconda3/lib/python3.7/site-packages/loom_viewer/loom_server.py", line 58, in cache_func response = make_response(view(*args, **kwargs)) File "/rds/general/user/mmoradim/home/anaconda3/lib/python3.7/site-packages/loom_viewer/loom_server.py", line 187, in send_indexjs return flask.send_file('static/index.html', mimetype='text/html') File "/rds/general/user/mmoradim/home/anaconda3/lib/python3.7/site-packages/flask/helpers.py", line 629, in send_file file = open(filename, "rb") FileNotFoundError: [Errno 2] No such file or directory: '/rds/general/user/mmoradim/home/anaconda3/lib/python3.7/site-packages/loom_viewer/static/index.html' ::1 - - [2019-10-30 12:14:34] "GET / HTTP/1.1" 500 411 1.042440

Any clue? Thanks

pl-ki commented 4 years ago

I have the same problem on *buntu 18.04 / python3.7. Somehow the /static directory is not created. Looking into it.

pcm32 commented 4 years ago

I have the same problem on macOS 10.14.5/python 3.6 and installed via pip. I presume that the pip package is not including the static files correctly.

pl-ki commented 4 years ago

Somehow I now got it working. I reconstructed the static dir by copying (find . -name....) files from the package into the static dir. It should look like this:

loom-viewer/python/build/lib/loom_viewer/static: total 36 -rw-rw-r-- 1 peter peter 19555 nov 5 15:53 favicon.ico drwxrwxr-x 2 peter peter 4096 nov 5 15:53 fonts -rw-rw-r-- 1 peter peter 768 nov 5 15:53 index.html drwxrwxr-x 2 peter peter 4096 nov 5 15:53 js drwxrwxr-x 2 peter peter 4096 nov 5 15:53 styles

loom-viewer/python/build/lib/loom_viewer/static/fonts: total 44 -rw-rw-r-- 1 peter peter 18028 nov 5 15:53 glyphicons-halflings-regular-448c34a56d699c29117adc64c43affeb.woff2 -rw-rw-r-- 1 peter peter 23424 nov 5 15:53 glyphicons-halflings-regular-fa2772327f55d8198301fdb8bcfc8158.woff

loom-viewer/python/build/lib/loom_viewer/static/js: total 4048 -rw-rw-r-- 1 peter peter 4141422 nov 5 15:53 bundle.974633fc16ebdf9944d0.js

loom-viewer/python/build/lib/loom_viewer/static/styles: total 152 -rw-rw-r-- 1 peter peter 155547 nov 5 15:53 ccf2c16328c8bcf1ab79.css

The "bundle.....js" file will have a different name depending on your build. I also needed to activate a conda environment to have it work.

prete commented 4 years ago

Same as #163