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

Import function unable to create twin for model that contains component #247

Open
bondcodyr opened this issue Feb 15, 2022 · 3 comments
Open

Comments

@bondcodyr
Copy link

bondcodyr commented Feb 15, 2022

I am trying to use the ADT import function to do bulk creation of twins via excel file. The function works as expected for models without components, but I get the following error for models that include components.

Error: Failed to create twins stp_AHU-Lobby
at https://explorer.digitaltwins.azure.net/static/js/main.69838216.chunk.js:1:288412
at c (https://explorer.digitaltwins.azure.net/static/js/2.75cc45df.chunk.js:2:7360360)
at Generator._invoke (https://explorer.digitaltwins.azure.net/static/js/2.75cc45df.chunk.js:2:7360148)
at Generator.E.forEach.e. [as next] (https://explorer.digitaltwins.azure.net/static/js/2.75cc45df.chunk.js:2:7360783)
at r (https://explorer.digitaltwins.azure.net/static/js/2.75cc45df.chunk.js:2:3050)
at s (https://explorer.digitaltwins.azure.net/static/js/2.75cc45df.chunk.js:2:3253)

and in the Output window:

image

This issue is seemingly the same as this one, which appears to be solved. However, in my case the problem persists for both the web-based version of ADT and a local instance.

There is no issue when creating the twin by hand (including for the example models below).

To reproduce, please use the models below and attached excel file. Thanks for your help!

  "@id": "dtmi:BDT:Air_Handling_Unit;1",
  "@type": "Interface",
  "displayName": "Air Handling Unit",
  "contents": [
    {
      "@type": "Property",
      "name": "name",
      "displayName": "name",
      "schema": "string",
      "writable": true
    },
    {
      "@type": "Component",
      "name": "design_air_flow_rate",
      "displayName": "design air flow rate",
      "schema": "dtmi:BDT:Volume_Flow_Rate;1"
    }
  ],
  "@context": "dtmi:dtdl:context;2"
},

{
  "@id": "dtmi:BDT:Volume_Flow_Rate;1",
  "@type": "Interface",
  "displayName": "Volume Flow Rate",
  "contents": [
    {
      "@type": "Property",
      "name": "unit",
      "schema": {
        "@type": "Enum",
        "valueSchema": "string",
        "displayName": "unit",
        "enumValues": [
          {
            "name": "cubic_feet_per_minute",
            "enumValue": "CFM"
          },
          {
            "name": "liters_per_second",
            "enumValue": "LPS"
          },
          {
            "name": "gallons_per_minute",
            "enumValue": "GPM"
          }
        ]
      },
      "writable": true
    },
    {
      "@type": "Property",
      "name": "value",
      "displayName": "value",
      "schema": "double"
    }
  ],
  "@context": "dtmi:dtdl:context;2"
}

bulkUpload_ahu_test.xlsx

@bondcodyr
Copy link
Author

I forgot to add that the graph preview appears to handle this correctly. The errors occur after clicking Start Import.

@bondcodyr
Copy link
Author

I get the same results when trying to use the import function with a JSON input (as opposed to excel file).

@mwdhont
Copy link

mwdhont commented Apr 1, 2022

I'm facing the same issue. Could we expect this to be fixed?

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

2 participants