Hello,
In the last version of the stack (github master), there has been modifications done to daf/persistence/registries.py which produce a little but in my code, which was working fine with version 12.0 (SqliteRegistry.lookup (version 12.0.rc1-1-gc553c11+3). The code in there is
if not hasattr(lookupProperties, '__iter__'):
lookupProperties = (lookupProperties,)
cmd = "SELECT DISTINCT "
cmd += ", ".join(lookupProperties)
Which works fine if lookupProperties is a dictionnary.
In [18]: lookupProperties = {'a': 1, 'b': 2}
In [19]: if not hasattr(lookupProperties, '__iter__'):
....: lookupProperties = (lookupProperties,)
In [20]: cmd = "SELECT DISTINCT "
In [21]: cmd += ", ".join(lookupProperties)
In [22]: lookupProperties
Out[22]: {'a': 1, 'b': 2}
For the same dictionnary, and with the last version of the stack (master on github), we get (with sequencify coming from utils.py in the same package) the following error:
lookupProperties = sequencify(lookupProperties)
cmd = "SELECT DISTINCT "
cmd += ", ".join(lookupProperties)
In [25]: ''.join(sequencify({'a': 1, 'b': 2}))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-25-e19e7f6a0aa2> in <module>()
----> 1 ''.join(sequencify({'a': 1, 'b': 2}))
TypeError: sequence item 0: expected string, dict found
Has it been seen anywhere else or is it a problem on the way I use the stack? To be precise, I get this error while doing
keys = butler.getKeys("forced_src")
butler.queryMetadata("forced_src", format=keys)
Thanks