Code Monkey home page Code Monkey logo

Comments (4)

foozzi avatar foozzi commented on May 18, 2024 2

Hi ,
Can you tell me how i can install it without Docker?

Thanks 😊

You can clone this repo then create virtual env. like:
cd nginx-ui
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
flask run

from nginx-ui.

Jey-Cee avatar Jey-Cee commented on May 18, 2024

Does not work for me, got the following error when execute flask run:

` * Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.

  • Debug mode: off
    Traceback (most recent call last):
    File "/opt/nginx-ui/venv/bin/flask", line 11, in
    sys.exit(main())
    File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/flask/cli.py", line 967, in main
    cli.main(args=sys.argv[1:], prog_name="python -m flask" if as_module else None)
    File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/flask/cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
    File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
    File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
    File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/click/decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
    File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
    File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/flask/cli.py", line 848, in run_command
    app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
    File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/flask/cli.py", line 305, in init
    self._load_unlocked()
    File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/flask/cli.py", line 330, in _load_unlocked
    self._app = rv = self.loader()
    File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/flask/cli.py", line 392, in load_app
    app = locate_app(self, import_name, None, raise_if_not_found=False)
    File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/flask/cli.py", line 240, in locate_app
    import(module_name)
    File "/opt/nginx-ui/wsgi.py", line 2, in
    from app import create_app
    File "/opt/nginx-ui/app/init.py", line 2, in
    from config import config
    File "/opt/nginx-ui/config.py", line 4, in
    class Config(object):
    File "/opt/nginx-ui/config.py", line 5, in Config
    SECRET_KEY = os.urandom(64).hex()
    AttributeError: 'str' object has no attribute 'hex'`

from nginx-ui.

schenkd avatar schenkd commented on May 18, 2024

Does not work for me, got the following error when execute flask run:

` * Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.

* Debug mode: off
  Traceback (most recent call last):
  File "/opt/nginx-ui/venv/bin/flask", line 11, in 
  sys.exit(main())
  File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/flask/cli.py", line 967, in main
  cli.main(args=sys.argv[1:], prog_name="python -m flask" if as_module else None)
  File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/flask/cli.py", line 586, in main
  return super(FlaskGroup, self).main(*args, **kwargs)
  File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/click/core.py", line 782, in main
  rv = self.invoke(ctx)
  File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/click/core.py", line 1259, in invoke
  return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
  return ctx.invoke(self.callback, **ctx.params)
  File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/click/core.py", line 610, in invoke
  return callback(*args, **kwargs)
  File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/click/decorators.py", line 73, in new_func
  return ctx.invoke(f, obj, *args, **kwargs)
  File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/click/core.py", line 610, in invoke
  return callback(*args, **kwargs)
  File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/flask/cli.py", line 848, in run_command
  app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
  File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/flask/cli.py", line 305, in **init**
  self._load_unlocked()
  File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/flask/cli.py", line 330, in _load_unlocked
  self._app = rv = self.loader()
  File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/flask/cli.py", line 392, in load_app
  app = locate_app(self, import_name, None, raise_if_not_found=False)
  File "/opt/nginx-ui/venv/local/lib/python2.7/site-packages/flask/cli.py", line 240, in locate_app
  **import**(module_name)
  File "/opt/nginx-ui/wsgi.py", line 2, in 
  from app import create_app
  File "/opt/nginx-ui/app/**init**.py", line 2, in 
  from config import config
  File "/opt/nginx-ui/config.py", line 4, in 
  class Config(object):
  File "/opt/nginx-ui/config.py", line 5, in Config
  SECRET_KEY = os.urandom(64).hex()
  AttributeError: 'str' object has no attribute 'hex'`

Hey @Jey-Cee , what version of python are you using? It seems that your Python version returns a string at os.urandom and not a byte-string. That seems to be the bug.

from nginx-ui.

Jey-Cee avatar Jey-Cee commented on May 18, 2024

@schenkd thanks for your reply. After searching a while on the web it seems that this function is not implemented in python version <3.x. I found that my system is missing a package for python3 that is necessary to use with flask. This is why python 2.7 was used and caused this Problem.

So nginx-ui needs python3.

from nginx-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.