Giter Site home page Giter Site logo

gamegos / cesi Goto Github PK

View Code? Open in Web Editor NEW
570.0 43.0 182.0 5.24 MB

CeSI is a web interface for managing multiple supervisors from the same place.

License: GNU General Public License v3.0

Python 43.14% CSS 0.47% JavaScript 53.40% HTML 1.66% Makefile 1.24% Shell 0.08%
supervisor flask reactjs cesi

cesi's People

Contributors

alphekimoglu avatar brglng avatar burcinakalin avatar dependabot[bot] avatar f9n avatar fahri314 avatar gulsahkose avatar hxpro avatar inseek avatar kozdincer avatar ozgio avatar pax0r avatar sharkyrawr avatar smilezheng avatar stafox avatar tiagocoutinho avatar trmanderson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cesi's Issues

some suggestions

I use cesi 2.6.7,it over flow the line when check the logs,Then I add this into the build/static/css/main.59121a6e.chunk.css for temporary.
.modal-body p {
word-break: break-word;
}
maybe should have the fucntion for tail the logs, or check the days of logs we set
wish the project more and more active

Using unix socket

I have inherited the following setup:

...
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl = unix://%(ENV_HOME)s/supervisord.sock
...

Could this work also via a unix socket?

A readlog bug

I name a subprocess of one supervisor node such as aaa_server.bin. And when I click its 'read log' button, no response, but when I change its name to aaa_server(without '.bin'), I can its button has response.
I find that the subprocess name can not contain ".", otherwise its readlog function can not be accessed.
qq 20160805112137

socket.gaierror: [Errno -5] No address associated with hostname

Hi
My cesi server can’t start,I don’t know why.
When I run python web.py,there is an error occurred.
Help me!!!

  • Running on http://<127.0.0.1>:5000/
    Traceback (most recent call last):
    File "web.py", line 535, in
    app.run(debug=True, use_reloader=True, host=HOST)
    File "/usr/lib/python2.6/site-packages/flask/app.py", line 739, in run
    run_simple(host, port, self, **options)
    File "/usr/lib/python2.6/site-packages/werkzeug/serving.py", line 613, in run_simple
    test_socket.bind((hostname, port))
    File "", line 1, in bind
    socket.gaierror: [Errno -5] No address associated with hostname
    #################################
    Here is my cesi.conf

[node:<node_name>]
;username =
;password =
host = <10.13.2.49>
port = <9001>

[node:<node_name2>]
;username =
;password =
;host =
;port =

;[environment:<environment_name>]
;members = <node_name>, <node_name2>

[cesi]
database = </root/cesi/cesi/userinfo.db>
activity_log = </root/cesi/cesi/access.log>
host = <127.0.0.1>

sqlite3 ~/cesi/userinfo.sql < userinfo.sql

sqlite3 ~/cesi/userinfo.sql < userinfo.sql
Error: near line 1: file is encrypted or is not a database
Error: near line 2: file is encrypted or is not a database
Error: near line 3: file is encrypted or is not a database

i can not do ip what i wrong ???
Thanks for help

Unable to resolve “No address associated with hostname” on azure web service

Hi,
I am quite new in azure and facing issue in my deployed web app written in flask.
I have built a solution using flask where, user can send mail to my company mail box. The main code written on application.py is below

from flask import Flask, render_template
from flask_mail import Mail, Message

app = Flask(name)
app.config.update(
DEBUG=True,
MAIL_SERVER='My Company SMTP MAIL SERVER',
MAIL_PORT=My Company SMTP PORT NUMBER,
# MAIL_USE_SSL=True,
MAIL_USERNAME='[email protected]',
)
mail = Mail(app)

@app.route('/')
def mailSend():
try:
msg = Message("Send Mail Tutorial!",
sender="[email protected]",
recipients=["[email protected]"])
msg.html = render_template('linkPage.html')
mail.send(msg)
return 'Mail sent!'
except Exception as e:
print(type(e))
print(e)
return 'error'

The sender mail address is shared mail and does not need password to send any mail. I already tested the solution on my pycharm IDE and worked totally fine without any issue. However, its throwing error on azure app service after deploying over there. Its saying gaierror'> [Errno -5] No address associated with hostname

Any suggestion on this please let me know.

FYI, I didnt mention my company SMTP server name and port number for data sensitivity

Log API return 500

API: /api/v2/nodes/jumpserver/processes/cesi:cesi/log/
Request Method: GET
Status Code: 500 INTERNAL SERVER ERROR

uptime display is error

version 2.7.1

description: "pid 146470, uptime 2 days, 21:42:59"
exitstatus: 0
group: "cesi"
logfile: "/tmp/cesi-stdout---supervisor-eu2kXd.log"
name: "cesi"
now: 1606985061
now_hr: "16:44:21"
pid: 146470
spawnerr: ""
start: 1606734082
start_hr: "19:01:22"
state: 20
statename: "RUNNING"
stderr_logfile: "/tmp/cesi-stderr---supervisor-cNkfed.log"
stdout_logfile: "/tmp/cesi-stdout---supervisor-eu2kXd.log"
stop: 0
stop_hr: "08:00:00"
uptime: "2"

Uptime display error

If the process number is large, the Uptime will display error

example:
file: cesi/cesi/static/custom.js
description: "pid 199917, uptime 0:47:11"
var $uptime = result['process_info'][$counter]['description'].substring(17,24);   
$uptime == "e 0:47:"    
Solution:   
var $uptime = result['process_info'][$counter]['description'].split(", uptime")[1];    

thank you

Uptime does not include the days

Hi,

I was wondering why my processes seemed to only running for some hours. The uptime in the gui does only show hours, minutes and seconds event though the days are included in the json response.

node connection not recovered from previous disconnection

Hello everyone here,

I had two nodes connected with cesi, one of them disconnected from the network yesterday,
but after the connection issue is fixed (ping, ssh are fine, and the website of supervisord is alive too), cesi never connect with the node again, even after I restart cesi process.
Any idea about how to solve it?

Thank you!

can't manage grouped process(2.6.5)

Hi,
When i do a grouped config in supervisord,and i can't do any thing in the browers with that group's member, the background log file show:
<Fault 10: 'BAD_NAME: test1'>
/api/v2/nodes/api/processes/test1/stop/

i think it shoud be groupname:test1 ?

thank you!

Suggestions/Improvements

Few improvements/suggestions

  1. During restarting multiple processes, there should be some indication/warning until all processes are restarted.
  2. Currently, the restart process works serially, It will be better if we have it done parallel.
  3. Currently, Readlog displays only stdout log file, there should be an option to read stderr logs also.
  4. It will be better if we have google authentication.

Interface is puzzled

This web interface is not like the one above. My interface is like the one below. Is this normal? Or is it because I installed something wrong? I installed version CeSI 2.4

image

start not available for exited/failed programs

Programs that are "EXITED" or "FAILED" only have the readlog button option, but no start button. It would be great if these programs could be (re)started through the gui by providing a start button (I know supervisor doesn't consider this a restart since the program is already stopped).

If the behavior of "STOPPED" programs (which has a start button and a gray-ed out stop button) could be applied to these other states, then the problem would be solved.

Navbar Scroll problem

Nodes section has no scrollbar when you have a lot of nodes and not enough resolution. Most probably same thing for Environment and Groups section.

HTTPS redirect

Hi,
I'm using HAProxy to redirect to the local machine where cesi is hosted. I'm using a certificate on HAProxy so that all traffic is encrypted, but whenever i use the base url, i get to redirected to /login and the https disappears from the url, which gives an incorrect url.

I am not entirely sure if this can be fixed from HAProxy or somewhere in cesi.

morris.js:78 Uncaught Error: Graph container element not found

11111
Hi, I found that there was an error in the console when I added the new machine, and the new machine was not open.Is it related to the python version?The python version of the new machine is 2.6 and the python version on the cesi machine is 2.7. Is there a solution to that?
2222

Interface customization

How would I go about customizing the interface? For instance change the top left "Cesi version_here" on the dashboard.

Default account

I can't login with admin:admin while first run it, it raise an exception:

(sqlite3.IntegrityError) UNIQUE constraint failed: users.username [SQL: 'INSERT INTO users (username, password, usertype) VALUES (?, ?, ?)'] [parameters: ('admin', 'pbkdf2:sha256:50000$bO2jbFQ4$6df2181d675615bd2fc4fcb9e61fd24a77765317067a1af028447f8ea4d673a0', 0)] (Background on this error at: http://sqlalche.me/e/gkpj)

however, it works until I am deleting the record of username=admin in users table.

Unable to login. Where is the default userinfo.sql file? How do I initialize a database?

errror log

[2019-05-24 11:15:03,387] ERROR in app: Exception on /api/v2/auth/login/ [POST]
Traceback (most recent call last):
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/util/_collections.py", line 1010, in __call__
    return self.registry[key]
KeyError: 140072201742080

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 338, in dbapi
    from pysqlite2 import dbapi2 as sqlite
ModuleNotFoundError: No module named 'pysqlite2'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/cesi/cesi/api/v2/auth.py", line 35, in login
    result = User.verify(user_credentials["username"], user_credentials["password"])
  File "/usr/local/cesi/cesi/models.py", line 37, in verify
    user = User.query.filter_by(username=username).first()
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 514, in __get__
    return type.query_class(mapper, session=self.sa.session())
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/orm/scoping.py", line 78, in __call__
    return self.registry()
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/util/_collections.py", line 1012, in __call__
    return self.registry.setdefault(key, self.createfunc())
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 3206, in __call__
    return self.class_(**local_kw)
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 143, in __init__
    bind = options.pop('bind', None) or db.engine
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 877, in engine
    return self.get_engine()
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 896, in get_engine
    return connector.get_engine()
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 559, in get_engine
    self._engine = rv = sqlalchemy.create_engine(info, **options)
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/engine/__init__.py", line 435, in create_engine
    return strategy.create(*args, **kwargs)
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py", line 87, in create
    dbapi = dialect_cls.dbapi(**dbapi_args)
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 343, in dbapi
    raise e
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 341, in dbapi
    from sqlite3 import dbapi2 as sqlite  # try 2.5+ stdlib name.
  File "/usr/local/Python3.6/lib/python3.6/sqlite3/__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "/usr/local/Python3.6/lib/python3.6/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
60.12.216.130 - - [24/May/2019 11:15:03] "POST /api/v2/auth/login/ HTTP/1.1" 500 -
[2019-05-24 11:15:05,009] ERROR in app: Exception on /api/v2/auth/login/ [POST]
Traceback (most recent call last):
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/util/_collections.py", line 1010, in __call__
    return self.registry[key]
KeyError: 140072201742080

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 338, in dbapi
    from pysqlite2 import dbapi2 as sqlite
ModuleNotFoundError: No module named 'pysqlite2'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/cesi/cesi/api/v2/auth.py", line 35, in login
    result = User.verify(user_credentials["username"], user_credentials["password"])
  File "/usr/local/cesi/cesi/models.py", line 37, in verify
    user = User.query.filter_by(username=username).first()
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 514, in __get__
    return type.query_class(mapper, session=self.sa.session())
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/orm/scoping.py", line 78, in __call__
    return self.registry()
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/util/_collections.py", line 1012, in __call__
    return self.registry.setdefault(key, self.createfunc())
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 3206, in __call__
    return self.class_(**local_kw)
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 143, in __init__
    bind = options.pop('bind', None) or db.engine
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 877, in engine
    return self.get_engine()
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 896, in get_engine
    return connector.get_engine()
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py", line 559, in get_engine
    self._engine = rv = sqlalchemy.create_engine(info, **options)
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/engine/__init__.py", line 435, in create_engine
    return strategy.create(*args, **kwargs)
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py", line 87, in create
    dbapi = dialect_cls.dbapi(**dbapi_args)
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 343, in dbapi
    raise e
  File "/usr/local/cesi/venv/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 341, in dbapi
    from sqlite3 import dbapi2 as sqlite  # try 2.5+ stdlib name.
  File "/usr/local/Python3.6/lib/python3.6/sqlite3/__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "/usr/local/Python3.6/lib/python3.6/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
60.12.216.130 - - [24/May/2019 11:15:05] "POST /api/v2/auth/login/ HTTP/1.1" 500 -

start cesi fail

I use second method to install cesi,but when I use systemctl command to start cesi,it remind me that python3 file not exist, 'cesi.service: Changing to the requested working directory failed: No such file or directory,cesi.service: Failed at step CHDIR spawning /opt/cesi/venv/bin/python3: No such file or directory',My system is Manjaro.

behavior of node-wide start/stop/restart options

There are a few oddities in the behavior of the node-wide start/stop/restart options (not sure what to call them, the ones at the upper-left of a node that work for the checked services):

  • if you "start" a failed program, the entries in each column are off (name in the uptime column, uptime in the state column, state shifts over where read log was, coloring is off as the uptime is red and the state is green); this works properly for "STOPPED" programs and is mixed for "EXITED"/"FAILED" programs, so it may be resolved with issue #26
  • CESI will attempt to apply your command to all checked programs even if it isn't available (if you "start" a running service, it will fail; similarly if you "restart" a stopped service it will give an error message that it isn't running and can't stop but will start); not sure if this is the desired behavior since CESI will otherwise only provide valid options (e.g. stopped services can't restart or stop, only start available)

Uses cesi with docker .When the first login admin , I has a 500 error.

the error stack log:

File "/usr/share/pyshared/flask/app.py", line 1836, in call
return self.wsgi_app(environ, start_response)
File "/usr/share/pyshared/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/usr/share/pyshared/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/share/pyshared/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/share/pyshared/flask/app.py", line 1478, in full_dispatch_request
response = self.make_response(rv)
File "/usr/share/pyshared/flask/app.py", line 1566, in make_response
raise ValueError('View function did not return a response')
ValueError: View function did not return a response

Invalid username or password

Login to CESI with the default account for the first time. After restarting CESI, you will be prompted with "invalid user name or password". Even if you change the password, it will be invalid. The following is the background error, can you help to see what the problem.

File "/data/Python3.6/lib/python3.6/site-packages/Flask-0.12.1-py3.6.egg/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/data/Python3.6/lib/python3.6/site-packages/Flask-0.12.1-py3.6.egg/flask/app.py", line 1598, in dispatch_request
return self.view_functionsrule.endpoint
File "/data/cesi/cesi/api/v2/auth.py", line 35, in login
result = User.verify(user_credentials["username"], user_credentials["password"])
File "/data/cesi/cesi/models.py", line 37, in verify
user = User.query.filter_by(username=username).first()
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 3397, in first
ret = list(self[0:1])
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 3171, in getitem
return list(res)
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 3503, in iter
return self._execute_and_instances(context)
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 3525, in _execute_and_instances
querycontext, self._connection_from_session, close_with_result=True
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 3540, in _get_bind_args
mapper=self._bind_mapper(), clause=querycontext.statement, **kw
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 3518, in _connection_from_session
conn = self.session.connection(**kw)
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/session.py", line 1141, in connection
execution_options=execution_options,
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/session.py", line 1147, in _connection_for_bind
engine, execution_options
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/session.py", line 409, in _connection_for_bind
self._assert_active()
File "/data/Python3.6/lib/python3.6/site-packages/SQLAlchemy-1.3.18-py3.6-linux-x86_64.egg/sqlalchemy/orm/session.py", line 296, in _assert_active
code="7s2a",
sqlalchemy.exc.InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (sqlite3.IntegrityError) column username is not unique
[SQL: INSERT INTO users (username, password, usertype) VALUES (?, ?, ?)]
[parameters: ('admin', 'pbkdf2:sha256:50000$AuTMhJVb$32b7ed7be7ca0344bf6984e194e35d418ef1ca818fec5d6ab83372dae98eb4e4', 0)]
(Background on this error at: http://sqlalche.me/e/13/gkpj) (Background on this error at: http://sqlalche.me/e/13/7s2a)
10.208.1.13 - - [14/Aug/2020 05:53:04] "POST /api/v2/auth/login/ HTTP/1.1" 500

Flask attribute error

Importing flask from python console and when it's being run brings this attribute error:
Traceback (most recent call last):
File "/data/data/ru.iiec.pydroid3/files/accomp_files/iiec_hackrun/iiec_hackrun.py", line 29, in start(fakepyfile,mainpyfile) File "/data/data/ru.iiec.pydroid3/files/accomp_files/iiec_hackrun/iiec_hackrun.py", line 28, in start exec(open(mainpyfile).read(), main.dict) File "", line 6, in File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/flask/init.py", line 21, in from .app import Flask, Request, Response File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/flask/app.py", line 25, in from . import cli, json File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/flask/json/init.py", line 21, in from itsdangerous import json as _json File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/itsdangerous.py", line 38, in import simplejson as json
File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/simplejson/init.py", line 115, in
from .encoder import JSONEncoder, JSONEncoderForHTML
File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/simplejson/encoder.py", line 15, in
c_encode_basestring_ascii, c_make_encoder = _import_speedups()
File "/data/data/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/simplejson/encoder.py", line 12, in _import_speedups
return _speedups.encode_basestring_ascii, _speedups.make_encoder
AttributeError: module 'markupsafe._speedups' has no attribute 'encode_basestring_ascii'

[Program finished]

Please help :AttributeError: 'Flask' object has no attribute 'teardown_appcontext'

root@Soc:/home/lizx/cesi# vi /etc/cesi.conf

[node:220]
username = soc_web
password = XXXX
host = 10.1.101.220
port = 9001

[node:<node_name2>]
;username =
;password =
;host =
;port =

[environment:soc_web]
members = 220

[cesi]
database =/home/lizx/cesi/userinfo.db
activity_log =/home/lizx/cesi/cesi_activity.log
host = 0.0.0.0

root@Soc:/home/lizx/cesi# python cesi/web.py
Traceback (most recent call last):
File "cesi/web.py", line 27, in
@app.teardown_appcontext
AttributeError: 'Flask' object has no attribute 'teardown_appcontext'

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.