Open
Description
This issue occur if a autoloaded resource is accessed via get_resource again. The problem occur in the function _update_container where the value is removed from contents. If accessing the same resource again, the resource is already loaded but has no contents.
I resolve this issue by adding the following lines to get_resource
if uri.normalize() in self.resources:
resource = self.resources[uri.normalize()]
if resource.contents:
return self.resources[uri.normalize()]
else:
# If not, we create a new resource
resource = self.create_resource(uri)
See the stack trace below, when that happens. The line numbers may be not 100% correct.
_try_resource_autoload, resource.py:464
_get_href_decoder, resource.py:453
resolve_object, resource.py:400
__getattribute__, ecore.py:1018
_update_container, valuecontainer.py:78
add, valuecontainer.py:346
Metadata
Metadata
Assignees
Labels
No labels