You should use [CommandError](https://docs.djangoproject.com/en/dev/howto/custom-management-commands/#django.core.management.CommandError) inside a command.

Additionally, never use `except` without an exception type. It's better to get a stack trace instead of silencing any possible error with this. And the error message does not really tell us anything in this case :) I'd just leave away the try-catch block here.