djmelik / lndash

A simple web dashboard for lnd.
https://lightninglayer.com
GNU General Public License v3.0
118 stars 16 forks source link

Cannot start #29

Closed gustavocoding closed 5 years ago

gustavocoding commented 5 years ago

Following the instruction on Fedora Linux, I get:

(venv) ➜  lndash git:(master) gunicorn main:app -b 0.0.0.0:8080
[2019-01-27 17:28:28 +0000] [9890] [INFO] Starting gunicorn 19.9.0
[2019-01-27 17:28:28 +0000] [9890] [INFO] Listening at: http://0.0.0.0:8080 (9890)
[2019-01-27 17:28:28 +0000] [9890] [INFO] Using worker: sync
[2019-01-27 17:28:28 +0000] [9894] [INFO] Booting worker with pid: 9894
[2019-01-27 17:28:30 +0000] [9894] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/usr/lib/python2.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
    self.load_wsgi()
  File "/usr/lib/python2.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
    return self.load_wsgiapp()
  File "/usr/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/lib/python2.7/site-packages/gunicorn/util.py", line 350, in import_app
    __import__(module)
  File "/home/bitcoin/lndash/main.py", line 4, in <module>
    import views
  File "/home/bitcoin/lndash/views.py", line 17, in <module>
    macaroon = open(config.macaroon_path, "rb").read().hex()
AttributeError: 'str' object has no attribute 'hex'
[2019-01-27 17:28:30 +0000] [9894] [INFO] Worker exiting (pid: 9894)
[2019-01-27 17:28:30 +0000] [9890] [INFO] Shutting down: Master
[2019-01-27 17:28:30 +0000] [9890] [INFO] Reason: Worker failed to boot.
prusnak commented 5 years ago

You need to run Python 3, not Python 2.

gustavocoding commented 5 years ago

Indeed, I missed one command to activate the venv and it ended-up using the system's python