Opened 3 years ago

Closed 3 years ago

#7596 closed defect (fixed)

Report simple error if bundle already installed instead of traceback

Reported by: Zach Pearson Owned by: Zach Pearson
Priority: moderate Milestone: 1.5
Component: Tool Shed Version:
Keywords: Cc: Greg Couch
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Playing around with installing ArtiaX today to see if pip would give its output about the site-packages directory and saw this when I tried to install ArtiaX over a previous install:

toolshed install /Users/zjp/Downloads/ChimeraX_ArtiaX-0.1-py3-none-any.whlTraceback (most recent call last):

File "/Users/zjp/Desktop/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/cmd_line/tool.py", line 319, in execute

cmd.run(cmd_text)

File "/Users/zjp/Desktop/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/core/commands/cli.py", line 2897, in run

result = ci.function(session, kw_args)

File "/Users/zjp/Desktop/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/core/commands/toolshed.py", line 301, in toolshed_install

ts.install_bundle(bundles, logger, kw)

File "/Users/zjp/Desktop/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/core/toolshed/init.py", line 913, in install_bundle

_install_bundle(self, bundle, logger, per_user=per_user, reinstall=reinstall, session=session, no_deps=no_deps)

File "/Users/zjp/Desktop/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/toolshed_utils/init.py", line 219, in _install_bundle

raise ToolshedInstalledError("bundle %r already installed" % bundle_name)

chimerax.core.toolshed.ToolshedInstalledError: bundle '/Users/zjp/Downloads/ChimeraX_ArtiaX-0.1-py3-none-any.whl' already installed

chimerax.core.toolshed.ToolshedInstalledError: bundle '/Users/zjp/Downloads/ChimeraX_ArtiaX-0.1-py3-none-any.whl' already installed

File "/Users/zjp/Desktop/ChimeraX_Daily.app/Contents/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/chimerax/toolshed_utils/init.py", line 219, in _install_bundle
raise ToolshedInstalledError("bundle %r already installed" % bundle_name)

See log for complete Python traceback.


I'd expect that the caller would just log that the bundle is already installed and move on instead of letting the traceback percolate up to the log.

Change History (2)

comment:1 by Eric Pettersen, 3 years ago

Cc: Greg Couch added
Component: UnassignedTool Shed

comment:2 by Zach Pearson, 3 years ago

Resolution: fixed
Status: assignedclosed

We now log an error instead of letting the error propagate upwards uncaught.

Note: See TracTickets for help on using tickets.