Project

General

Profile

Actions

Bug #7698

closed

User profile page error after disabling a blueprint

Added by Rajmund Hruška about 1 year ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Development - GUI
Target version:
Start date:
12/11/2023
Due date:
% Done:

0%

Estimated time:
To be discussed:
No

Description

When a blueprint (like detectors) is disabled and user had done some action related to that module (create, update, ...) prior to disabling of the module, the user profile page is not working. Here is an error code after I checked my profile page:

[Mon Dec 11 12:44:43.930315 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828] mod_wsgi (pid=14728): Exception occurred processing WSGI script '/usr/local/bin/mentat-hawat.wsgi'.
[Mon Dec 11 12:44:43.930938 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828] Traceback (most recent call last):
[Mon Dec 11 12:44:43.931188 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 2552, in __call__
[Mon Dec 11 12:44:43.931199 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     return self.wsgi_app(environ, start_response)
[Mon Dec 11 12:44:43.931209 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 2532, in wsgi_app
[Mon Dec 11 12:44:43.931214 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     response = self.handle_exception(e)
[Mon Dec 11 12:44:43.931221 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 2529, in wsgi_app
[Mon Dec 11 12:44:43.931239 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     response = self.full_dispatch_request()
[Mon Dec 11 12:44:43.931247 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1825, in full_dispatch_request
[Mon Dec 11 12:44:43.931253 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     rv = self.handle_user_exception(e)
[Mon Dec 11 12:44:43.931262 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1823, in full_dispatch_request
[Mon Dec 11 12:44:43.931268 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     rv = self.dispatch_request()
[Mon Dec 11 12:44:43.931277 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/flask_debugtoolbar/__init__.py", line 142, in dispatch_request
[Mon Dec 11 12:44:43.931282 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     return view_func(**req.view_args)
[Mon Dec 11 12:44:43.931302 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/flask_login/utils.py", line 290, in decorated_view
[Mon Dec 11 12:44:43.931307 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     return current_app.ensure_sync(func)(*args, **kwargs)
[Mon Dec 11 12:44:43.931315 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/flask_principal.py", line 199, in _decorated
[Mon Dec 11 12:44:43.931333 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     rv = f(*args, **kw)
[Mon Dec 11 12:44:43.931343 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/flask/views.py", line 107, in view
[Mon Dec 11 12:44:43.931367 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     return current_app.ensure_sync(self.dispatch_request)(**kwargs)
[Mon Dec 11 12:44:43.931387 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/hawat/blueprints/users/__init__.py", line 417, in dispatch_request
[Mon Dec 11 12:44:43.931401 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     return self.generate_response()
[Mon Dec 11 12:44:43.931426 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/hawat/view/mixin.py", line 94, in generate_response
[Mon Dec 11 12:44:43.931435 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     **self.response_context
[Mon Dec 11 12:44:43.931443 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/flask/templating.py", line 147, in render_template
[Mon Dec 11 12:44:43.931448 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     return _render(app, template, context)
[Mon Dec 11 12:44:43.931456 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/flask/templating.py", line 130, in _render
[Mon Dec 11 12:44:43.931463 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     rv = template.render(context)
[Mon Dec 11 12:44:43.931471 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/jinja2/environment.py", line 1301, in render
[Mon Dec 11 12:44:43.931490 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     self.environment.handle_exception()
[Mon Dec 11 12:44:43.931498 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/jinja2/environment.py", line 936, in handle_exception
[Mon Dec 11 12:44:43.931506 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     raise rewrite_traceback_stack(source=source)
[Mon Dec 11 12:44:43.931514 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/hawat/blueprints/users/templates/users/show.html", line 1, in top-level template code
[Mon Dec 11 12:44:43.931521 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     {% extends "_layout.html" %}
[Mon Dec 11 12:44:43.931529 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/hawat/blueprints/design_bs3/templates/_layout.html", line 132, in top-level template code
[Mon Dec 11 12:44:43.931548 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     {%- block body %}
[Mon Dec 11 12:44:43.931564 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/hawat/blueprints/design_bs3/templates/_layout.html", line 187, in block 'body'
[Mon Dec 11 12:44:43.931571 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     {%- block content %}{% endblock content %}
[Mon Dec 11 12:44:43.931579 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/hawat/blueprints/users/templates/users/show.html", line 241, in block 'content'
[Mon Dec 11 12:44:43.931587 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     {{ macros_page.render_changelog_records(user_changelog, context_action_menu_changelogs, idprefix = 'actionlog', hide_author = True) }}
[Mon Dec 11 12:44:43.931646 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/jinja2/runtime.py", line 777, in _invoke
[Mon Dec 11 12:44:43.931677 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     rv = self._func(*arguments)
[Mon Dec 11 12:44:43.931692 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/hawat/blueprints/design_bs3/templates/_macros_page.html", line 152, in template
[Mon Dec 11 12:44:43.931698 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     {{ render_label_module(item.endpoint) }}
[Mon Dec 11 12:44:43.931706 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/jinja2/runtime.py", line 777, in _invoke
[Mon Dec 11 12:44:43.931712 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     rv = self._func(*arguments)
[Mon Dec 11 12:44:43.931721 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/hawat/blueprints/design_bs3/templates/_macros_page.html", line 140, in template
[Mon Dec 11 12:44:43.931727 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     <span class="badge text-bg-secondary" data-bs-toggle="tooltip" title="{{ endpoint.split('.')[0] }}">{{ get_module_icon(endpoint) }}</span>
[Mon Dec 11 12:44:43.931736 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/hawat/base.py", line 623, in get_module_icon
[Mon Dec 11 12:44:43.931744 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     self.get_endpoint_class(endpoint).module_ref().get_module_icon(),
[Mon Dec 11 12:44:43.931753 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]   File "/var/mentat/venv/lib/python3.7/site-packages/hawat/base.py", line 267, in get_endpoint_class
[Mon Dec 11 12:44:43.931760 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828]     "Unknown endpoint name '{}'.".format(endpoint)
[Mon Dec 11 12:44:43.931783 2023] [wsgi:error] [pid 14728] [client 2001:718:1:5::ffff:7fb:42828] hawat.base.HawatException: Unknown endpoint name 'detectors.update'.

The same problem occurs when trying to search changelogs, if a changelog of a disabled module is there.

Actions #1

Updated by Jakub Judiny 9 months ago

  • Target version changed from Backlog to 2.12.1
Actions #2

Updated by Jakub Judiny 9 months ago

  • Description updated (diff)
Actions #3

Updated by Jakub Judiny 9 months ago

  • Status changed from New to Resolved
  • Assignee set to Jakub Judiny
Actions #4

Updated by Rajmund Hruška 9 months ago

  • Status changed from Resolved to In Review
Actions #5

Updated by Rajmund Hruška 9 months ago

  • Status changed from In Review to Closed
Actions

Also available in: Atom PDF