Opened 8 years ago

Closed 8 years ago

#22883 closed Cleanup/optimization (duplicate)

Unhelpful GeoDjango error message when credentials are invalid

Reported by: anonymous Owned by: nobody
Component: GIS Version: 1.6
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

I went through the GeoDjango tutorial several times this evening not realizing that my Postgres credentials were incorrect. The error message it gave me lead me to believe it was a versioning problem and not a DB connection issue:

django.core.exceptions.ImproperlyConfigured: Cannot determine PostGIS version for database "blanket". GeoDjango requires at least PostGIS version 1.3. Was the database created from a spatial database template?

I believe the right thing to do would be to include the raw DB error.

Change History (5)

comment:1 Changed 8 years ago by anonymous

Summary: Unhelpful GeoDjango error messageUnhelpful GeoDjango error message when credentials are invalid

comment:2 Changed 8 years ago by anonymous

This thing won't let me include my email address but it's floydophone@….

comment:3 Changed 8 years ago by Claude Paroz

Triage Stage: UnreviewedAccepted

comment:4 Changed 8 years ago by Tim Graham

Easy pickings: unset
Has patch: set
Patch needs improvement: set
Type: BugCleanup/optimization

Related pull request that previously didn't have a ticket.

comment:5 Changed 8 years ago by Claude Paroz

Resolution: duplicate
Status: newclosed

This is in fact a duplicate of #21504, where the catched exception was changed from DatabaseError to ProgrammingError to let those credential-specific issues slip through. This will be available in Django 1.7. Thanks for the patch and report anyway.

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