There's a similar effect with named operations. For example:
>>> target = lp.git_repositories.getByPath(path='germinate').target
>>> target.getSeries(name='trunk')
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/resource.py", line 734, in __getattr__
return super(Entry, self).__getattr__(name)
File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/resource.py", line 358, in __getattr__
% (self, attr))
AttributeError: https://api.launchpad.net/devel/germinate object has no attribute 'getSeries'
>>> target._ensure_representation()
>>> target.getSeries(name='trunk')
<project_series at https://api.launchpad.net/devel/germinate/trunk>
As suggested by the (inappropriate for production use) workaround in this transcript, I think the fix is probably just to sprinkle self._ensure_representation() around a couple more places in Resource and its subclasses that rely on having the representation available.
There's a similar effect with named operations. For example:
>>> target = lp.git_ repositories. getByPath( path='germinate ').target getSeries( name='trunk' ) python2. 7/dist- packages/ lazr/restfulcli ent/resource. py", line 734, in __getattr__ _getattr_ _(name) python2. 7/dist- packages/ lazr/restfulcli ent/resource. py", line 358, in __getattr__ /api.launchpad. net/devel/ germinate object has no attribute 'getSeries' _ensure_ representation( ) getSeries( name='trunk' ) /api.launchpad. net/devel/ germinate/ trunk>
>>> target.
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/lib/
return super(Entry, self)._
File "/usr/lib/
% (self, attr))
AttributeError: https:/
>>> target.
>>> target.
<project_series at https:/
As suggested by the (inappropriate for production use) workaround in this transcript, I think the fix is probably just to sprinkle self._ensure_ representation( ) around a couple more places in Resource and its subclasses that rely on having the representation available.