Opened 7 years ago

Closed 7 years ago

#8978 closed (fixed)

python dbshell unhelpful error when postgresql-client not installed

Reported by: darkpixel Owned by: adrian
Component: Core (Management commands) Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by kmtracey)

If you try to start a dbshell and don't have the postgresql client installed, you get an unhelpful error message:

aaron@hoth:~/code/sfd$ ./ dbshell
Traceback (most recent call last):
  File "./", line 11, in <module>
  File "/usr/lib/python2.5/site-packages/django/core/management/", line 340, in execute_manager
  File "/usr/lib/python2.5/site-packages/django/core/management/", line 295, in execute
  File "/usr/lib/python2.5/site-packages/django/core/management/", line 77, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.5/site-packages/django/core/management/", line 96, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.5/site-packages/django/core/management/", line 178, in handle
    return self.handle_noargs(**options)
  File "/usr/lib/python2.5/site-packages/django/core/management/commands/", line 10, in handle_noargs
  File "/usr/lib/python2.5/site-packages/django/db/backends/postgresql/", line 17, in runshell
    os.execvp('psql', args)
  File "/usr/lib/python2.5/", line 353, in execvp
    _execvpe(file, args)
  File "/usr/lib/python2.5/", line 389, in _execvpe
    func(fullname, *argrest)
OSError: [Errno 2] No such file or directory

Change History (4)

comment:1 Changed 7 years ago by darkpixel

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Sorry, I totally forgot to wrap that in braces and apparently can't edit my own ticket.

comment:2 Changed 7 years ago by kmtracey

  • Description modified (diff)

Fixed formatting.

comment:3 Changed 7 years ago by adrian

  • Owner changed from nobody to adrian
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

Good call -- we should have a friendlier error message here. I'm on it.

comment:4 Changed 7 years ago by adrian

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [8990]) Fixed #8978 -- We now print a helpful error message for ' dbshell' if the client executable is not found. Previously we were displaying a traceback

Note: See TracTickets for help on using tickets.
Back to Top