New user auto creation with LDAP authentication failing


I’ve been successfully using galaxy.auth.providers.ldap_ad with auto account creation for over a year, and today it started throwing an error. There is a chance this is the first new user to log in since I upgraded to release_19.05. Here is the log output:

galaxy.auth.providers.ldap_ad DEBUG 2019-09-26 16:03:06,064 LDAP authentication successful
galaxy.auth.util DEBUG 2019-09-26 16:03:06,071 Email:, auto-register with username: someone
galaxy.web.framework.decorators ERROR 2019-09-26 16:03:06,097 Uncaught exception in exposed API method:
Traceback (most recent call last):
  File "/home/galaxy/galaxy-dist/lib/galaxy/web/framework/", line 282, in decorator
    rval = func(self, trans, *args, **kwargs)
  File "/home/galaxy/galaxy-dist/lib/galaxy/webapps/galaxy/controllers/", line 116, in login
    return self.__validate_login(trans, payload, **kwd)
  File "/home/galaxy/galaxy-dist/lib/galaxy/webapps/galaxy/controllers/", line 137, in __validate_login
    message, user = self.__autoregistration(trans, login, password)
  File "/home/galaxy/galaxy-dist/lib/galaxy/webapps/galaxy/controllers/", line 93, in __autoregistration
    user = self.user_manager.create(email=email, username=username, password="")
  File "/home/galaxy/galaxy-dist/lib/galaxy/managers/", line 99, in create
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/", line 162, in do
    return getattr(self.registry(), name)(*args, **kwargs)
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/", line 2446, in flush
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/", line 2584, in _flush
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/util/", line 67, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/", line 2544, in _flush
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/", line 416, in execute
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/", line 583, in execute
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/", line 245, in save_obj
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/", line 1116, in _emit_insert_statements
    statement, params
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/", line 980, in execute
    return meth(self, multiparams, params)
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/sql/", line 273, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/", line 1099, in _execute_clauseelement
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/", line 1174, in _execute_context
    e, util.text_type(statement), parameters, None, None
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/", line 1458, in _handle_dbapi_exception
    util.raise_from_cause(sqlalchemy_exception, exc_info)
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/util/", line 296, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/", line 1171, in _execute_context
    context = constructor(dialect, self, conn, *args)
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/", line 719, in _init_compiled
    for key in compiled_params
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/engine/", line 719, in <genexpr>
    for key in compiled_params
  File "/home/galaxy/galaxy-dist/.venv/local/lib/python2.7/site-packages/sqlalchemy/sql/", line 1194, in process
    return process_param(value, dialect)
  File "/home/galaxy/galaxy-dist/lib/galaxy/model/", line 373, in process_bind_param
    value = value[0:self.impl.length]
StatementError: (exceptions.TypeError) '_hashlib.HASH' object has no attribute '__getitem__' [SQL: u'INSERT INTO galaxy_user (create_time, update_time, email, username, password, last_password_change, external, form_values_id, deleted, purged, disk_usage, active, activation_token) VALUES (%(create_time)s, %(update_time)s, %(email)s, %(username)s, %(password)s, %(last_password_change)s, %(external)s, %(form_values_id)s, %(deleted)s, %(purged)s, %(disk_usage)s, %(active)s, %(activation_token)s) RETURNING'] [parameters: [{'username': 'someone', 'disk_usage': None, 'form_values_id': None, 'deleted': False, 'email': '', 'last_password_change': datetime.datetime(2019, 9, 26, 16, 3, 6, 92741), 'external': False, 'active': True, 'password': <sha1 HASH object @ 0x7f9950dda620>, 'purged': False, 'activation_token': None}]]

Please let me know if you know what broke. I checked the github issue tracker but didn’t see anything that seemed related.


1 Like

Welcome @wholtz

I’ve pinged the developers at Gitter to see if anyone recognizes the issue. Please feel free to chat there, too.

I also found a similar error message reported yesterday:

object has no attribute ‘getitem

BUT with respect to a completely different use case. No idea if related. There will be feedback there as well:

If there is no actionable feedback after a few more days, then this should be reported as a new issue at Be clear and include as many details as you can, including what you posted above. You might also want to cross-link the two (put the Galaxy help link in the Github issue ticket, and then post that Github ticket back here. That way if others run into this issue, or a similar issue, now or later, all will be connected.


admin edit: correction Galaxy releases all support Python 2, as will the upcoming 19.09 release. Python 3 is not recommended quite yet.

Hi Will,
I think I have a hunch. Are you using use_pbkdf2: false in config/galaxy.yml ?

1 Like

Hi @nsoranzo,

Yes, I did have use_pbkdf2: false and removing this setting did allow autoregistration to start working again. Given how disconnected autoregistration is from FTP server encryption settings, I’m quite impressed with your ability to nail this on your first attempt!

I’m no longer making use of the FTP server functionality, so my issue is resolved.

thanks much!


1 Like

@wholtz Thanks for the compliment, your report and the traceback were very helpful in tracking the issue down. It should be fixed by , let us know if you want to have this backported to 19.05.

1 Like