Closed tsengia closed 1 year ago
Nevermind, I found the error in my request. Closing.
Thanks for reporting this. Though you might have found an issue on your side the CSE still should not crash when encountering an, I guess, illformed resource or specialisation type, but return gracefully an error message. I will look into this.
This fixes this issue in the development branch. It also returns a meaning full dbg message.
Hi, I'm not sure if this is truely a bug, or if I am not fully understanding oneM2M. I am attempting to create a FlexContainer using a custom definition that I've placed in the
init
folder. My flex container definition is below (ignore the line numbers of the left):The REST request that I'm sending is here:
This results in the following error and stack trace:
Following this trace I found a section of code in
resources/Resource.py
that seems to be the root cause of this error. On line 90 of Resource.py, theself.tpe
assignment is skipped if the resource being created is a FlexContainer:https://github.com/ankraft/ACME-oneM2M-CSE/blob/ddd62345e89c9ce1be48c0425c1149243c1495ef/acme/resources/Resource.py#L90-L91
Later in the same function, a resourceID is assigned using
self.tpe
: https://github.com/ankraft/ACME-oneM2M-CSE/blob/ddd62345e89c9ce1be48c0425c1149243c1495ef/acme/resources/Resource.py#L106-L107Because
self.tpe
was never set, this results in theNoneType object has no attribute 'partition'
Is this expected behavior? Am I allowed to request the creation of a FlexContainer without giving a resourceID in my request? Or do I have to specify the resourceID in the request?
Thanks!