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

Traceback from importer item type combobox #2662

Closed
PiispaH opened this issue Mar 18, 2024 · 0 comments
Closed

Traceback from importer item type combobox #2662

PiispaH opened this issue Mar 18, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@PiispaH
Copy link
Collaborator

PiispaH commented Mar 18, 2024

I have one mapping in importer that imports entities along with parameter values. Changing the Item type in the importer specification editor from Entity class to Entity group causes the following traceback:

Traceback (most recent call last):
  File "C:\spine-toolbox\spinetoolbox\widgets\notification.py", line 219, in _push_notification
    if self._settings.value(self._settings_key, defaultValue="2") != "2":
  File "C:\toolbox\src\spine-items\spine_items\importer\commands.py", line 429, in redo
    self._model.set_mappings_type(self._table_row, self._list_row, self._new_type)
  File "C:\toolbox\src\spine-items\spine_items\importer\mvcmodels\mappings_model.py", line 736, in set_mappings_type
    root_mapping = import_mapping_from_dict({"map_type": map_type})
  File "C:\toolbox\src\spinedb-api\spinedb_api\import_mapping\import_mapping_compat.py", line 87, in import_mapping_from_dict
    raise ValueError(
ValueError: unknown "map_type" value, expected any of ObjectClass, RelationshipClass, Alternative, Scenario, ScenarioAlternative, ObjectGroup, ParameterValueList, got EntityGroup

Also got this

AttributeError: Slot 'ChangeNotifier::_push_notification(int)' not found.

when trying various item types.

@PiispaH PiispaH added bug Something isn't working 0.8-dev labels Mar 18, 2024
@PiispaH PiispaH added this to the v0.8.0 milestone Mar 18, 2024
@soininen soininen self-assigned this Mar 28, 2024
soininen added a commit to spine-tools/Spine-Database-API that referenced this issue Apr 2, 2024
Importer needs methods to create blank mappings. Here they are.

Re spine-tools/Spine-Toolbox#2662
soininen added a commit to spine-tools/spine-items that referenced this issue Apr 2, 2024
Importer was using legacy functionality in spinedb_api to get blank
mappings when user changes the mapping type. This does not work e.g.
with Entity group mappings since those did not exist in pre-0.7 world.

Re spine-tools/Spine-Toolbox#2662
@soininen soininen closed this as completed Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants