Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.
This repository was archived by the owner on Jan 7, 2023. It is now read-only.

AttributeError: 'ThreadedDict' object has no attribute 'userrole' #251

@ningli16

Description

@ningli16

Reproduce steps:

  1. Install CeTune master
  2. Install CeTune webui
  3. Add user:
    python user_Management.py -o add --user_name admin --passwd 123456 --role admin
  4. Run benchmark.

There's error in "python webui.py" runtime log:

10.239.44.90:63246 - - [30/Jun/2017 10:05:00] "HTTP/1.1 GET /configuration/user_role" - 500 Internal Server Error
<Storage {'timestamp': u'2017-06-30T10:04:04.898784'}>
10.239.44.90:63246 - - [30/Jun/2017 10:05:01] "HTTP/1.1 POST /monitor/tail_console" - 200 OK
get_param:<Storage {}>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/web.py-0.40.dev0-py2.7.egg/web/application.py", line 257, in process
return self.handle()
File "/usr/local/lib/python2.7/dist-packages/web.py-0.40.dev0-py2.7.egg/web/application.py", line 248, in handle
return self._delegate(fn, self.fvars, args)
File "/usr/local/lib/python2.7/dist-packages/web.py-0.40.dev0-py2.7.egg/web/application.py", line 488, in _delegate
return handle_class(cls)
File "/usr/local/lib/python2.7/dist-packages/web.py-0.40.dev0-py2.7.egg/web/application.py", line 466, in handle_class
return tocall(*args)
File "webui.py", line 75, in GET
return common.eval_args( self, function_name, web.input() )
File "/home/ning/upload/docker/CeTune/conf/common.py", line 605, in eval_args
if function_name != "":
File "webui.py", line 82, in user_role
output = session.userrole
File "/usr/local/lib/python2.7/dist-packages/web.py-0.40.dev0-py2.7.egg/web/session.py", line 68, in getattr
return getattr(self._data, name)
AttributeError: 'ThreadedDict' object has no attribute 'userrole'

Actually, when running python user_Management.py -o list
there is admin user listed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions