Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Creating Models From Directory #81

Open
ogiel opened this issue Apr 6, 2022 · 1 comment
Open

Error Creating Models From Directory #81

ogiel opened this issue Apr 6, 2022 · 1 comment

Comments

@ogiel
Copy link

ogiel commented Apr 6, 2022

It seems to be currently impossible to easily upload all models from REC into an ADT resource instance while using the sample at https://github.com/Azure-Samples/digital-twins-samples/tree/master/AdtSampleApp/SampleClientApp.

First of all it seems impossible to upload everything at once due to data limits (which is fine). This is fixable by first uploading the role.json file and then every child directory of /Models/. However, this crashes on the directories /Capability, /Colletion and /Space (not sure why, the CLI says "Validated JSON for all files - now validating DTDL" but then it crashes with "Invalid command. Please type 'help' for more information".

I can then use the CreateModels command to create separate models from these directories, but it crashes when using the LoadModelsFromDirectory command.

Is there any way to overcome this, and if not; will it come in the future?

@ogiel
Copy link
Author

ogiel commented Apr 6, 2022

Upon further investigation; it seems that the error is caused because the models are being uploaded in the wrong order. I have used the CreateModels command to upload all the way to the deepest level in Models\Capability\Actuator\BinaryActuator\DefaultOverrideActuator\DefaultActuator\ResetActuator (which is a pain). On every level I tried to upload the models from directory but that didn't work even at \ResetActuator (which contains 2 .jsons and no other folders).

I then used CreateModels for FaultResetActuator.json and got an error; Then I uploaded ResetActuator.json which worked with no problem, Finally I uploaded FaultResetActuator.json and now it does work. So, I have both models in \ResetActuator uploaded now, but using LoadModelsFromDirectory on that same directory does not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant