How do I run locally?
I know I'm not supposed to enter private key data on the main site. So I downloaded the github code, but what are the requirements to run locally? And instructions anywhere? I was sort of expecting something similar to Ian Coleman's bip39-standalone.html https://github.com/iancoleman/bip39/releases that I can open in the browser and run.
I tried running src/templates/index.html in the browser but the buttons don't work.
Ah, yes, the front end relies on a backend python server. I never finished the documentation but the basic steps are:
- create the Docker container:
docker-compose build - And run it:
docker-compose up - At that point the backend server should be running locally and you can just point your browser to http://localhost:1237
I think I made a little progress but then ran into this error:
File "/home/sq/Code/nostrtool/src/app.py", line 8, in
I get this error when I run docker-compose up on Debian:
~/Development/nostr/nostrtool$ docker-compose up
[+] Running 1/0
✔ Container nostrtool-flask-1 Created 0.0s
Attaching to nostrtool-flask-1
nostrtool-flask-1 | Traceback (most recent call last):
nostrtool-flask-1 | File "/srv/.env/bin/flask", line 5, in <module>
nostrtool-flask-1 | from flask.cli import main
nostrtool-flask-1 | File "/srv/.env/lib/python3.9/site-packages/flask/__init__.py", line 5, in <module>
nostrtool-flask-1 | from .app import Flask as Flask
nostrtool-flask-1 | File "/srv/.env/lib/python3.9/site-packages/flask/app.py", line 30, in <module>
nostrtool-flask-1 | from werkzeug.urls import url_quote
nostrtool-flask-1 | ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/srv/.env/lib/python3.9/site-packages/werkzeug/urls.py)
nostrtool-flask-1 exited with code 1
I get this error when I run
docker-compose upon Debian:~/Development/nostr/nostrtool$ docker-compose up [+] Running 1/0 ✔ Container nostrtool-flask-1 Created 0.0s Attaching to nostrtool-flask-1 nostrtool-flask-1 | Traceback (most recent call last): nostrtool-flask-1 | File "/srv/.env/bin/flask", line 5, in <module> nostrtool-flask-1 | from flask.cli import main nostrtool-flask-1 | File "/srv/.env/lib/python3.9/site-packages/flask/__init__.py", line 5, in <module> nostrtool-flask-1 | from .app import Flask as Flask nostrtool-flask-1 | File "/srv/.env/lib/python3.9/site-packages/flask/app.py", line 30, in <module> nostrtool-flask-1 | from werkzeug.urls import url_quote nostrtool-flask-1 | ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/srv/.env/lib/python3.9/site-packages/werkzeug/urls.py) nostrtool-flask-1 exited with code 1
same thing here
If you are still experiencing the werkzeug.urls ImportError.. , I was. Try this work around.. add the following sed command line in the Dockerfile just before the line that has pip doing the read of the requirements doc...
RUN sed -i '/Flask==2.2.2/a Werkzeug==2.2.3' requirements.txt RUN /srv/.env/bin/pip install -r requirements.txt --no-cache-dir
Also, I use this command for when i build ..so I can see the progress of the building.. docker-compose --progress plain build --no-cache
good luck
If you are still experiencing the werkzeug.urls ImportError.. , I was. Try this work around.. add the following sed command line in the Dockerfile just before the line that has pip doing the read of the requirements doc...
RUN sed -i '/Flask==2.2.2/a Werkzeug==2.2.3' requirements.txt RUN /srv/.env/bin/pip install -r requirements.txt --no-cache-dir
This worked! Thanks