atviriduomenys / spinta

Spinta is a framework to describe, extract and publish data (a DEP Framework).
MIT License
13 stars 4 forks source link

Model reference 'datasets/gov/rc/ar_ws/text_with_coordinates/LocatorDesignator' not found. (AR) #988

Open ievabraskute opened 5 days ago

ievabraskute commented 5 days ago
Exception has occurred: ModelReferenceNotFound       (note: full exception trace is shown but execution is paused at: copy)
Model reference 'datasets/gov/rc/ar_ws/text_with_coordinates/LocatorDesignator' not found.
  Context:
    component: spinta.types.datatype.ExternalRef
    manifest: default
    schema: Auto DSA iš XSD:103
    dataset: datasets/gov/rc/ar_ws/text_with_coordinates
    resource: resource1                   
    model: datasets/gov/rc/ar_ws/text_with_coordinates/Building
    entity: /ADRESAI/ADRESAS                  
    property: has_building_designator
    attribute: None
    type: _external_ref
    resource.backend: datasets/gov/rc/ar_ws/text_with_coordinates/resource1                   
    ref: datasets/gov/rc/ar_ws/text_with_coordinates/LocatorDesignator
  File "/Users/ibraske/projects/spinta/spinta/types/ref/link.py", line 22, in link
    raise ModelReferenceNotFound(dtype, ref=rmodel)
  File "/Users/ibraske/projects/spinta/spinta/types/model.py", line 373, in link
    commands.link(context, prop.dtype)
  File "/Users/ibraske/projects/spinta/spinta/types/model.py", line 215, in link
    commands.link(context, prop)
  File "/Users/ibraske/projects/spinta/spinta/manifests/commands/link.py", line 11, in link
    commands.link(context, obj)
  File "/Users/ibraske/projects/spinta/spinta/cli/helpers/store.py", line 133, in load_manifest
    commands.link(context, store.manifest)
  File "/Users/ibraske/projects/spinta/spinta/cli/manifest.py", line 176, in _read_and_return_rows
    store = load_manifest(
  File "/Users/ibraske/projects/spinta/spinta/manifests/tabular/helpers.py", line 2670, in <genexpr>
    rows = ({c: row[c] for c in cols} for row in rows)
  File "/Users/ibraske/projects/spinta/spinta/manifests/tabular/helpers.py", line 2687, in write_csv
    writer.writerows(rows)
  File "/Users/ibraske/projects/spinta/spinta/manifests/tabular/helpers.py", line 2672, in write_tabular_manifest
    write_csv(pathlib.Path(path), rows, cols)
  File "/Users/ibraske/projects/spinta/spinta/cli/manifest.py", line 133, in copy_manifest
    write_tabular_manifest(context, output, rows)
  File "/Users/ibraske/projects/spinta/spinta/cli/manifest.py", line 62, in copy (Current frame)
    copy_manifest(
  File "/Users/ibraske/projects/spinta/_process_dsa.py", line 50, in main
    result = runner.invoke(app, args)
  File "/Users/ibraske/projects/spinta/_process_dsa.py", line 61, in <module>
    main()
spinta.exceptions.ModelReferenceNotFound: Model reference 'datasets/gov/rc/ar_ws/text_with_coordinates/LocatorDesignator' not found.
  Context:
    component: spinta.types.datatype.ExternalRef
    manifest: default
    schema: Auto DSA iš XSD:103
    dataset: datasets/gov/rc/ar_ws/text_with_coordinates
    resource: resource1                   
    model: datasets/gov/rc/ar_ws/text_with_coordinates/Building
    entity: /ADRESAI/ADRESAS                  
    property: has_building_designator
    attribute: None
    type: _external_ref
    resource.backend: datasets/gov/rc/ar_ws/text_with_coordinates/resource1                   
    ref: datasets/gov/rc/ar_ws/text_with_coordinates/LocatorDesignator

Related

karina-klinkeviciute commented 20 hours ago

The same happened in JANGIS 437, when the model is in the same dataset (and file), and is definitely there, no spelling mistakes, but still got an error. I then noticed that model name in the error message was prefixed with \n, so I deleted that new line symbol in the Excel file (which was not actually even visible) and it worked.