Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • A Alex_Project
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Zhang, Yuanpeng
  • Alex_Project
  • Issues
  • #14

Closed
Open
Created Jun 18, 2021 by Zhang, Yuanpeng@y8z⭐Owner

[Task] Solve the issue with GSAS-tab reset

  1. Identify the issue.

    • Load in the attached file (NOM161049tof.gsa) by going to Rietveld tab and click on Load button. Then go to Edit menu and click on Reset GSAS-tab item and ADDIE will crash, throwing out error message as below,
    Traceback (most recent call last):
      File "/SNS/users/y8z/miniconda/envs/addie_env_3/lib/python3.6/site-packages/addie/main.py", line 773, in do_reset_gsas_tab
        bragg_event_handler.BraggTree.do_reset_gsas_tab(self)
      File "/SNS/users/y8z/miniconda/envs/addie_env_3/lib/python3.6/site-packages/addie/rietveld/braggtree.py", line 336, in do_reset_gsas_tab
        main_window._myController.delete_workspace(workspace)
      File "/SNS/users/y8z/miniconda/envs/addie_env_3/lib/python3.6/site-packages/addie/addiedriver.py", line 190, in delete_workspace
        raise RuntimeError('Workspace %s does not exist.' % workspace_name)
    RuntimeError: Workspace Bank 1 - 15.099999999999994 does not exist.
    Aborted (core dumped)
  2. The last file in traceback is where the program stops but that is probably not the fundamental reason for the crash since the algorithm delete_workspace is just for deleting workspace. It is that the workspace that it is trying to delete does not exist, that crashes the program. So, we need to go up a little bit to check,

    File "/SNS/users/y8z/miniconda/envs/addie_env_3/lib/python3.6/site-packages/addie/rietveld/braggtree.py", line 336, in do_reset_gsas_tab
  3. Expanding the loaded in workspace we will find several children. When trying to resetting the GSAS-tab, we probably only need to delete the parent workspace and not to worry about deleting those children - from the error message, it seems we are trying to delete those children which are actually not workspace.

    In ADDIE programming framework, workspace is a special object and we have a lot of algorithms/methods specially designed for dealing with workspaces. Therefore, if the object passed to those algorithms/methods is not a workspace, we will be in trouble.

    This indicates we probably want to delete line from gsas_ws_name_list = bragg_list.get_child_nodes( to main_window._myController.delete_workspace(workspace) in /SNS/users/y8z/miniconda/envs/addie_env_3/lib/python3.6/site-packages/addie/rietveld/braggtree.py.

Edited Jun 18, 2021 by Zhang, Yuanpeng
Assignee
Assign to
Time tracking