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

Webapp dont work #61

Open
Diee92 opened this issue Feb 19, 2022 · 9 comments
Open

Webapp dont work #61

Diee92 opened this issue Feb 19, 2022 · 9 comments

Comments

@Diee92
Copy link

Diee92 commented Feb 19, 2022

hello, first thanks for the program, I have a problem with the webapp, I installed it in windows, everything is working but when I want to start the page it shows me this error

Traceback (most recent call last):
File "/usr/local/bin/nxbt", line 33, in
sys.exit(load_entry_point('nxbt', 'console_scripts', 'nxbt')())
File "/vagrant/nxbt/cli.py", line 321, in main
from .web import start_web_app
File "/vagrant/nxbt/web/init.py", line 1, in
from .app import start_web_app
File "/vagrant/nxbt/web/app.py", line 9, in
from flask import Flask, render_template, request
File "/usr/local/lib/python3.8/dist-packages/flask/init.py", line 19, in
from . import json
File "/usr/local/lib/python3.8/dist-packages/flask/json/init.py", line 15, in
from itsdangerous import json as _json
ImportError: cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.8/dist-packages/itsdangerous/init.py)

any ideas? Thank you

@ghost
Copy link

ghost commented Feb 25, 2022

The only workaround for nxbt to work is by downgrading Flash to version 1.0.3 then remove the "from itsdangerous" from line 15 in the file "/usr/local/lib/python3.8/dist-packages/flask/json/init.py", that's it.
431
432

@Diee92
Copy link
Author

Diee92 commented Mar 1, 2022

it worked! Thanks a lot

@amberestelle
Copy link

Similar issue:

Traceback (most recent call last):
File "/usr/local/bin/nxbt", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/nxbt/cli.py", line 321, in main
from .web import start_web_app
File "/usr/local/lib/python3.8/dist-packages/nxbt/web/init.py", line 1, in
from .app import start_web_app
File "/usr/local/lib/python3.8/dist-packages/nxbt/web/app.py", line 9, in
from flask import Flask, render_template, request
File "/usr/local/lib/python3.8/dist-packages/flask/init.py", line 14, in
from jinja2 import escape
ImportError: cannot import name 'escape' from 'jinja2' (/usr/local/lib/python3.8/dist-packages/jinja2/init.py)

any ideas?

@l4desu-mizu
Copy link

l4desu-mizu commented Mar 26, 2022

I'd like to try updating the dependencies. from what I see they are about a year old and some libs had major upgrades which introduce breaking changes. also, from what ive seen some code (i think dependency code) would not run with python3.8 or later.

for the specific error you encountered you can try downgrading jinja2. but i fear that'll let you spiral down the dependency mess i encountered :D (no critique, just saw what i stated above)

@ghost
Copy link

ghost commented Mar 27, 2022

amberestelle said:

any ideas?

Ok, i'll try to find the........ (looking at l4desu-mizu's post before i could say "workarounds.")

I'd like to try updating the dependencies.

Well, i was too late then, better luck next time for me...... ¯\_(ツ)_/¯

@jiyarong
Copy link

jiyarong commented Dec 2, 2022

same error here, any ideas?

@l4desu-mizu
Copy link

same error here, any ideas?

although I should try updating the dependencies yet again, you could try the branch that I've linked (not tested for a while)

@tea-bone2000
Copy link

I tried doing all of this today and am still getting the "ImportError: cannot import name 'escape' from 'jinja2' (/usr/local/lib/python3.8/dist-packages/jinja2/init.py)" when trying to launch the webapp

@glatavento
Copy link

I found this fork from useful-forks and luckily it works. Just create a venv, activate it, and run below to install it.

pip install git+https://github.com/piratasdoraio/nxbt.git

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

Successfully merging a pull request may close this issue.

6 participants