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

site-packages/loom_viewer/static missing after pip install #163

Closed kgerman73 closed 5 years ago

kgerman73 commented 6 years ago

I'm trying to run loom-viewer on an AWS instance running Amazon Linux with Python 3.6.5. loompy and loom-viewer install just fine but the html content seems to be missing. What am I doing wrong?

$ pip list | grep -i loom loom-viewer 0.32.4 loompy 2.0.16 $ loom version loom v0.32.4 $ loom

Looking up localhost:8003 Making HTTP connection to localhost:8003 Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://localhost:8003/ ERROR:flask.app:Exception on / [GET] Traceback (most recent call last): File "/omg/app/python/v3.6.5/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "/omg/app/python/v3.6.5/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "/omg/app/python/v3.6.5/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "/omg/app/python/v3.6.5/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise raise value File "/omg/app/python/v3.6.5/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/omg/app/python/v3.6.5/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functionsrule.endpoint File "/omg/app/python/v3.6.5/lib/python3.6/site-packages/loom_viewer/loom_server.py", line 58, in cache_func response = make_response(view(args, kwargs)) File "/omg/app/python/v3.6.5/lib/python3.6/site-packages/loom_viewer/loom_server.py", line 187, in send_indexjs return flask.send_file('static/index.html', mimetype='text/html') File "/omg/app/python/v3.6.5/lib/python3.6/site-packages/flask/helpers.py", line 588, in send_file file = open(filename, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/omg/app/python/v3.6.5/lib/python3.6/site-packages/loom_viewer/static/index.html' ::ffff:63.244.49.124 - - [2018-11-28 16:30:22] "GET / HTTP/1.1" 500 412 0.040199 ERROR:flask.app:Exception on / [GET] Traceback (most recent call last): File "/omg/app/python/v3.6.5/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "/omg/app/python/v3.6.5/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "/omg/app/python/v3.6.5/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "/omg/app/python/v3.6.5/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise raise value File "/omg/app/python/v3.6.5/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/omg/app/python/v3.6.5/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](req.view_args) File "/omg/app/python/v3.6.5/lib/python3.6/site-packages/loom_viewer/loom_server.py", line 58, in cache_func response = make_response(view(args, **kwargs)) File "/omg/app/python/v3.6.5/lib/python3.6/site-packages/loom_viewer/loom_server.py", line 187, in send_indexjs return flask.send_file('static/index.html', mimetype='text/html') File "/omg/app/python/v3.6.5/lib/python3.6/site-packages/flask/helpers.py", line 588, in send_file file = open(filename, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/omg/app/python/v3.6.5/lib/python3.6/site-packages/loom_viewer/static/index.html' ::ffff:63.244.49.124 - - [2018-11-28 16:30:32] "GET / HTTP/1.1" 500 412 0.010464

$ ll /omg/app/python/v3.6.5/lib/python3.6/site-packages/loom_viewer/static/ ls: cannot access /omg/app/python/v3.6.5/lib/python3.6/site-packages/loom_viewer/static/: No such file or directory $ ll /omg/app/python/v3.6.5/lib/python3.6/site-packages/loom_viewer/ total 108 -rw-r--r-- 1 root root 219 Aug 20 04:13 init.py -rw-r--r-- 1 root root 12019 Aug 20 04:13 loom_cli.py -rw-r--r-- 1 root root 27526 Aug 20 04:13 loom_datasets.py -rw-r--r-- 1 root root 17133 Aug 20 04:13 loom_expand.py -rw-r--r-- 1 root root 10253 Oct 3 07:33 loom_server.py -rw-r--r-- 1 root root 13688 Aug 20 04:13 loom_tiles.py -rw-r--r-- 1 root root 6005 Aug 20 04:13 loom_utils.py drwxr-xr-x 2 root root 6144 Nov 28 16:10 pycache -rw-r--r-- 1 root root 23 Oct 3 09:36 _version.py

prete commented 5 years ago

Not working for me either. I built the site using webpack (replaced ExtractTextPlugin with MiniCssExtractPlugin).

Just in case someone else needs it, here it is static.zip Just drop that in [...]/python3.X/site-packages/loom_viewer/

fbnrst commented 5 years ago

I just had the same issue. I worked around using @prete 's static.zip