1. Marcin Kuzminski
  2. RhodeCode

Issues

Issue #265 resolved

type issues with postgresql when setting up ldap

Daniel LaMotte
created an issue

I think I'm hitting this issue again in the 1.2.1 release (this ire related to bug #131 I think):

{{{

!python

2011-10-11 12:29:08.309 ERROR [rhodecode.controllers.admin.ldap_settings] Traceback (most recent call last): File "/pybubl/code/env/lib/python2.6/site-packages/rhodecode/controllers/admin/ldap_settings.py", line 110, in ldap_settings setting = RhodeCodeSettings.get_by_name(k) File "/pybubl/code/env/lib/python2.6/site-packages/rhodecode/model/db.py", line 157, in get_by_name .filter(cls.app_settings_name == ldap_key).scalar() File "/pybubl/code/env/lib/python2.6/site-packages/sqlalchemy/orm/query.py", line 1827, in scalar ret = self.one() File "/pybubl/code/env/lib/python2.6/site-packages/sqlalchemy/orm/query.py", line 1796, in one ret = list(self) File "/pybubl/code/env/lib/python2.6/site-packages/rhodecode/model/caching_query.py", line 82, in iter return Query.iter(self) File "/pybubl/code/env/lib/python2.6/site-packages/sqlalchemy/orm/query.py", line 1838, in iter self.session._autoflush() File "/pybubl/code/env/lib/python2.6/site-packages/sqlalchemy/orm/session.py", line 921, in _autoflush self.flush() File "/pybubl/code/env/lib/python2.6/site-packages/sqlalchemy/orm/session.py", line 1493, in flush self._flush(objects) File "/pybubl/code/env/lib/python2.6/site-packages/sqlalchemy/orm/session.py", line 1562, in _flush flush_context.execute() File "/pybubl/code/env/lib/python2.6/site-packages/sqlalchemy/orm/unitofwork.py", line 327, in execute rec.execute(self) File "/pybubl/code/env/lib/python2.6/site-packages/sqlalchemy/orm/unitofwork.py", line 471, in execute uow File "/pybubl/code/env/lib/python2.6/site-packages/sqlalchemy/orm/mapper.py", line 2107, in _save_obj execute(statement, params) File "/pybubl/code/env/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1399, in execute params) File "/pybubl/code/env/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1532, in _execute_clauseelement compiled_sql, distilled_params File "/pybubl/code/env/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1640, in _execute_context context) File "/pybubl/code/env/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1633, in _execute_context context) File "/pybubl/code/env/lib/python2.6/site-packages/sqlalchemy/engine/default.py", line 325, in do_execute cursor.execute(statement, parameters) ProgrammingError: (ProgrammingError) column "app_settings_value" is of type character varying but expression is of type boolean LINE 1: UPDATE rhodecode_settings SET app_settings_value=true WHERE ... ^ HINT: You will need to rewrite or cast the expression. 'UPDATE rhodecode_settings SET app_settings_value=%(app_settings_value)s WHERE rhodecode_settings.app_settings_id = %(rhodecode_settings_app_settings_id)s' {'app_settings_value': True, 'rhodecode_settings_app_settings_id': 4}

}}}

Comments (4)

  1. Marcin Kuzminski repo owner

    That's super odd, i force casting to unicode at model level yet query have True in params It might be with postgres, but it looks more like sqlalchemy issue, can you try to change safe_unicode(val) to safe_unicode(val).lower() ?

  2. Log in to comment