Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I run locally? #2

Open
statusquont opened this issue Jul 24, 2023 · 5 comments
Open

How do I run locally? #2

statusquont opened this issue Jul 24, 2023 · 5 comments

Comments

@statusquont
Copy link

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.

@kdmukai
Copy link
Owner

kdmukai commented Jul 25, 2023

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

@statusquont
Copy link
Author

I think I made a little progress but then ran into this error:

File "/home/sq/Code/nostrtool/src/app.py", line 8, in
from nostr.key import Bip39PrivateKey, PrivateKey, PublicKey
ImportError: cannot import name 'Bip39PrivateKey' from 'nostr.key' (/home/sq/.local/lib/python3.10/site-packages/nostr/key.py)

@stodge
Copy link

stodge commented Dec 26, 2023

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

@plebhash
Copy link

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

same thing here

@rphilbrdigits
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants