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

[BUG] Edit anonymous group UI broken after sync thredds content #549

Closed
tlvu opened this issue Dec 9, 2022 · 0 comments · Fixed by #550
Closed

[BUG] Edit anonymous group UI broken after sync thredds content #549

tlvu opened this issue Dec 9, 2022 · 0 comments · Fixed by #550
Assignees
Labels
bug Problem, error, or invalid behaviour

Comments

@tlvu
Copy link
Contributor

tlvu commented Dec 9, 2022

Describe the bug
Go to " Edit anonymous group UI thredds page" (https://lvupavicsmaster.ouranos.ca/magpie/ui/groups/anonymous/thredds), then click on the button "Sync" and it errors out.

Now that page UI page can not even load.

This is just on my test server so no big deal. I guess wiping /data/magpie_persist will fix it?

Screenshots
Screenshot from 2022-12-09 09-35-54

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/local/src/magpie/magpie/ui/utils.py", line 150, in wrap
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/pyramid/viewderivers.py", line 460, in rendered_view
    request, result, view_inst, context
  File "/usr/local/lib/python3.7/site-packages/pyramid/renderers.py", line 451, in render_view
    return self.render_to_response(response, system, request=request)
  File "/usr/local/lib/python3.7/site-packages/pyramid/renderers.py", line 474, in render_to_response
    result = self.render(value, system_values, request=request)
  File "/usr/local/lib/python3.7/site-packages/pyramid/renderers.py", line 470, in render
    result = renderer(value, system_values)
  File "/usr/local/lib/python3.7/site-packages/pyramid_mako/__init__.py", line 156, in __call__
    reraise(MakoRenderingException(errtext), None, exc_info[2])
  File "/usr/local/lib/python3.7/site-packages/pyramid_mako/compat.py", line 74, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.7/site-packages/pyramid_mako/__init__.py", line 148, in __call__
    result = template.render_unicode(**system)
  File "/usr/local/lib/python3.7/site-packages/mako/template.py", line 445, in render_unicode
    self, self.callable_, args, data, as_unicode=True
  File "/usr/local/lib/python3.7/site-packages/mako/runtime.py", line 879, in _render
    **_kwargs_for_callable(callable_, data),
  File "/usr/local/lib/python3.7/site-packages/mako/runtime.py", line 916, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/usr/local/lib/python3.7/site-packages/mako/runtime.py", line 943, in _exec_template
    callable_(context, *args, **kwargs)
  File "magpie_ui_home_templates_template_mako", line 99, in render_body
  File "magpie_ui_management_templates_edit_group_mako", line 185, in render_body
  File "magpie_ui_management_templates_tree_scripts_mako", line 117, in render_render_resource_permission_tree
  File "magpie_ui_management_templates_tree_scripts_mako", line 93, in render_tree
  File "magpie_ui_management_templates_tree_scripts_mako", line 77, in render_render_tree
  File "magpie_ui_management_templates_tree_scripts_mako", line 58, in render_tree
  File "magpie_ui_management_templates_tree_scripts_mako", line 77, in render_render_tree
  File "magpie_ui_management_templates_tree_scripts_mako", line 58, in render_tree
  File "magpie_ui_management_templates_tree_scripts_mako", line 73, in render_render_tree
  File "magpie_ui_management_templates_tree_scripts_mako", line 97, in render_resource_permissions_item
  File "magpie_ui_management_templates_tree_scripts_mako", line 133, in render_render_resource_permissions_item
pyramid_mako.MakoRenderingException:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pyramid_mako/__init__.py", line 148, in __call__
    result = template.render_unicode(**system)
  File "/usr/local/lib/python3.7/site-packages/mako/template.py", line 445, in render_unicode
    self, self.callable_, args, data, as_unicode=True
  File "/usr/local/lib/python3.7/site-packages/mako/runtime.py", line 879, in _render
    **_kwargs_for_callable(callable_, data),
  File "/usr/local/lib/python3.7/site-packages/mako/runtime.py", line 916, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/usr/local/lib/python3.7/site-packages/mako/runtime.py", line 943, in _exec_template
    callable_(context, *args, **kwargs)
  File "/opt/local/src/magpie/magpie/ui/home/templates/template.mako", line 104, in render_body
    ${self.body()}
  File "/opt/local/src/magpie/magpie/ui/management/templates/edit_group.mako", line 232, in render_body
    ${tree.render_resource_permission_tree(resources, permissions)}
  File "/opt/local/src/magpie/magpie/ui/management/templates/tree_scripts.mako", line 61, in render_render_resource_permission_tree
    ${render_tree(render_resource_permissions_item, resources)}
  File "/opt/local/src/magpie/magpie/ui/management/templates/tree_scripts.mako", line 30, in render_tree
    <%def name="render_resource_permission_tree(resources, permissions)">
  File "/opt/local/src/magpie/magpie/ui/management/templates/tree_scripts.mako", line 21, in render_render_tree
    ${render_tree(item_renderer, tree[key]["children"], level + 1)}
  File "/opt/local/src/magpie/magpie/ui/management/templates/tree_scripts.mako", line 7, in render_tree
    <%def name="render_tree(item_renderer, tree, level=0)">
  File "/opt/local/src/magpie/magpie/ui/management/templates/tree_scripts.mako", line 21, in render_render_tree
    ${render_tree(item_renderer, tree[key]["children"], level + 1)}
  File "/opt/local/src/magpie/magpie/ui/management/templates/tree_scripts.mako", line 7, in render_tree
    <%def name="render_tree(item_renderer, tree, level=0)">
  File "/opt/local/src/magpie/magpie/ui/management/templates/tree_scripts.mako", line 17, in render_render_tree
    ${item_renderer(key, tree[key], level)}
  File "/opt/local/src/magpie/magpie/ui/management/templates/tree_scripts.mako", line 30, in render_resource_permissions_item
    <%def name="render_resource_permission_tree(resources, permissions)">
  File "/opt/local/src/magpie/magpie/ui/management/templates/tree_scripts.mako", line 70, in render_render_resource_permissions_item
    <span class="tree-item-label label label-info">${value["resource_type"]}</span>
KeyError: 'resource_type'

[2022-12-09 14:28:51,830] INFO       [ThreadPoolExecutor-0_2][magpie.utils] Request: [POST lvupavicsmaster.ouranos.ca:443 /magpie/ui/error]

Desktop (please complete the following information):

  • OS: PAVICS docker stack
  • Instance: URL https://lvupavicsmaster.ouranos.ca/magpie/version
  • Version {"version": "3.26.0", "db_version": "0c6269f410cd", "code": 200, "detail": "Get version successful.", "type": "application/json", "path": "/version", "url": "https://lvupavicsmaster.ouranos.ca/magpie/version", "method": "GET"}
@tlvu tlvu added the bug Problem, error, or invalid behaviour label Dec 9, 2022
fmigneault added a commit that referenced this issue Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Problem, error, or invalid behaviour
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants