Skip to content

model: Referable.update_from() not working properly for contained Referable objects

Hi there,

I was testing the examples folder - especially the backend couchdb part - and there is a problem with the line example_submodel1.update(). Lines above that work fine. Seems like there is something wrong with .update() and .commit() ?

I'm receiving these errors:

PS C:\Users\samed\Desktop\pyi40aas\aas\examples> & "C:/Program Files/Python37/python.exe" "c:/Users/samed/Desktop/pyi40aas/aas/examples/tutorial_backend_couchdb.py"
Traceback (most recent call last):
  File "C:\Users\samed\AppData\Roaming\Python\Python37\site-packages\aas\backend\backends.py", line 154, in get_backend
    return _backends_map[scheme]
KeyError: 'couchdb'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "c:/Users/samed/Desktop/pyi40aas/aas/examples/tutorial_backend_couchdb.py", line 118, in <module>
    example_submodel1.update()
  File "C:\Users\samed\AppData\Roaming\Python\Python37\site-packages\aas\model\base.py", line 507, in update
    backends.get_backend(self.source).update_object(updated_object=self,
  File "C:\Users\samed\AppData\Roaming\Python\Python37\site-packages\aas\backend\backends.py", line 156, in get_backend
    raise UnknownBackendException("Could not find Backend for source '{}'".format(url)) from e
aas.backend.backends.UnknownBackendException: Could not find Backend for source 'couchdb://localhost:5984/aas_test/IRI-http%3A%2F%2Facplt.org%2FSubmodels%2FAssets%2FTestAsset%2FIdentification'

Thanks and kind regards,

Samed

Edited by Michael Thies
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information