Opened 4 years ago

Closed 4 years ago

#5134 closed defect (fixed)

Blastprotein Qt GUI breaks alphafold search

Reported by: Zach Pearson Owned by: Zach Pearson
Priority: moderate Milestone:
Component: Sequence Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

blocks #5133

AlphaFold tries to register a command and can't because of the way the Blastprotein tool has changed.

Traceback (most recent call last):
  File "/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/core/toolshed/info.py", line 312, in _register_cmd
    api._api_caller.register_command(api, self, ci, logger)
  File "/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/core/toolshed/__init__.py", line 1271, in register_command
    return cls._get_func(api, "register_command")(ci.name, logger)
  File "/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/alphafold/__init__.py", line 37, in register_command
    blast.register_alphafold_search_command(logger)
  File "/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/alphafold/blast.py", line 33, in register_alphafold_search_command
    from chimerax.blastprotein.cmd import Matrices
ImportError: cannot import name 'Matrices' from 'chimerax.blastprotein.cmd' (/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/blastprotein/cmd.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/core/commands/cli.py", line 2174, in lazy_register
    deferred.call()
  File "/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/core/commands/cli.py", line 2105, in call
    return self.proxy()
  File "/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/core/toolshed/info.py", line 302, in cb
    s._register_cmd(ci, l)
  File "/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/core/toolshed/info.py", line 314, in _register_cmd
    raise ToolshedError(
chimerax.core.toolshed.ToolshedError: register_command() failed for command alphafold search in bundle ChimeraX-AlphaFold:
cannot import name 'Matrices' from 'chimerax.blastprotein.cmd' (/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/blastprotein/cmd.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/cmd_line/tool.py", line 297, in execute
    cmd.run(cmd_text)
  File "/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/core/commands/cli.py", line 2791, in run
    self._find_command_name(final, used_aliases=_used_aliases)
  File "/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/core/commands/cli.py", line 2527, in _find_command_name
    what.lazy_register(cmd_name)
  File "/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/core/commands/cli.py", line 2176, in lazy_register
    raise RuntimeError("delayed command registration for %r failed (%s)" % (cmd_name, e))
RuntimeError: delayed command registration for 'alphafold search' failed (register_command() failed for command alphafold search in bundle ChimeraX-AlphaFold:
cannot import name 'Matrices' from 'chimerax.blastprotein.cmd' (/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/blastprotein/cmd.py))

RuntimeError: delayed command registration for 'alphafold search' failed (register_command() failed for command alphafold search in bundle ChimeraX-AlphaFold:
cannot import name 'Matrices' from 'chimerax.blastprotein.cmd' (/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/blastprotein/cmd.py))

File "/Users/zjp/git/rbvi/ChimeraX/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/core/commands/cli.py", line 2176, in lazy_register
raise RuntimeError("delayed command registration for %r failed (%s)" % (cmd_name, e))

See log for complete Python traceback.

Change History (3)

comment:1 by Zach Pearson, 4 years ago

Priority: blockermoderate

comment:2 by Zach Pearson, 4 years ago

That was a scary traceback but it ended up being caused by some imports of things that were moved to different files. Will close after finishing the Blastprotein GUI and doing some more integration testing.

comment:3 by Zach Pearson, 4 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.