PostgresSQL error masquerades as SettingNotSet

Issue #956 resolved
Former user created an issue

Hi,

when _value calls find_settings via _settings, and find_settings fail due to errors with postgresql, users will see a SettingNotSet error in the apache logs:

[Wed Nov 18 18:36:05 2009] [error] [client 117.205.3.241] val = self._value() [Wed Nov 18 18:36:05 2009] [error] [client 117.205.3.241] File "/usr/local/lib/python2.6/dist-packages/satchmo/configuration/values.py", line 286, in _value [Wed Nov 18 18:36:05 2009] [error] [client 117.205.3.241] raise SettingNotSet("Startup error, couldn't load %s.%s" %(self.group.key, self.key)) [Wed Nov 18 18:36:05 2009] [error] [client 117.205.3.241] SettingNotSet

This had lead me down the wrong path for quite a while, until I noticed that in the satchmo log it said:

2009-11-18 18:37:06,423 configuration: WARNING Problem finding settings PAYMENT.SSL, FATAL: missing or erroneous pg_hba.conf file

This finally clued me in.

I noticed this problem in 0.8.1, and looking at the latest version of apps/livesettings/values.py and it appears to also be in the latest changeset (0d3b1a2bfa7e).

It would be useful to have included the exception in the raise on line 284 such if one looks at the apache logs, one would enlightened as to the true cause more readily.

Comments (1)

  1. Log in to comment