﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27721	Unhelpful error message when trying to run shell that can't be imported	Peter Inglesby	nobody	"When you try to run a specific shell, and that shell can't be imported, you get a traceback with an unhelpful error message:

{{{
$ ./manage.py shell -i bpython
Traceback (most recent call last):
  File ""./manage.py"", line 22, in <module>
    execute_from_command_line(sys.argv)
  File ""/Users/inglesp/.pyenv/versions/inglesham-gallery/lib/python3.6/site-packages/django/core/management/__init__.py"", line 367, in execute_from_command_line
    utility.execute()
  File ""/Users/inglesp/.pyenv/versions/inglesham-gallery/lib/python3.6/site-packages/django/core/management/__init__.py"", line 359, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File ""/Users/inglesp/.pyenv/versions/inglesham-gallery/lib/python3.6/site-packages/django/core/management/base.py"", line 294, in run_from_argv
    self.execute(*args, **cmd_options)
  File ""/Users/inglesp/.pyenv/versions/inglesham-gallery/lib/python3.6/site-packages/django/core/management/base.py"", line 345, in execute
    output = self.handle(*args, **options)
  File ""/Users/inglesp/.pyenv/versions/inglesham-gallery/lib/python3.6/site-packages/django/core/management/commands/shell.py"", line 124, in handle
    raise ImportError(""Couldn't load any of the specified interfaces."")
ImportError: Couldn't load any of the specified interfaces.
}}}

Instead you should get `CommandError` explaining what's gone wrong.

I have a PR which comes from my first attempt at fixing #27670."	Cleanup/optimization	closed	Core (Management commands)	1.10	Normal	fixed			Ready for checkin	1	0	0	0	0	0
