openshift/openshift-restclient-python

matches.extend(self.__search([key] + parts[1:], resources)) TypeError: 'Resource' object is not iterable

lucastheisen opened this issue · 5 comments

This line allows for a recursive call to return a non-iterable value which causes extend to throw this error.

I noticed that the latest code completely changes, but given that it is still tagged as alpha, and a minor version bump, i thought you might want to know... We pegged our pip install to 0.8.6, so feel free to close and focus on 0.9

Yeah this was due to sloppy change management on my part. Basically the client creates a cache of discovered resources, and in version 0.8.7 we slightly changed the structure of that cache, but since I didn't pin the cache to a specific version of the client loading an older cache causes this error. In order to work around this you can rm ${TMPDIR}/osrcp-*.json, this should get the client working again. I'll cut a release today that pins the cache to a specific library version too.

@lucastheisen does this work for you with 0.8.8?

Sorry, been out, havn't had a chance to test. We reverted to the previous working version prior to your response. I will give this a try as soon as I can (might be another 2 weeks before i get to it), but feel free to close at any time.

@fabianvf , sorry for the delay... Finally updated to 0.8.8 today, no errors. Thanks for the fix.