Closed f-hafner closed 2 weeks ago
Clarification: when setting up a new workflow using "Data -> Story Elements" for both Actions
and Actors
widgets, it works fine. Then, when changing to "Selected Data -> Story elements" for Actors
widgets, I get a KeyError
described above. Changing back to "Data -> Story elements" does not solve the error.
I suspect this is not a bug with story navigator. @f-hafner could you help me reproduce this error?
So, it's quite subtle. It happens when certain connections from table widget to actor widget are modified.
Consider the workflow
in table with row selected
, select one or multiple rows. leave the table in table without row selected (untouched)
as-is. Now add an actor widget that takes input from the table with selected row.
Import Documents
Selected data -> Story elements
. this works fineData -> Story elements
, I get the error Error encountered in widget Actors:
Traceback (most recent call last):
File "/home/flavio/repositories/projects/navigating-stories/orange-story-navigator/.venv/lib/python3.9/site-packages/Orange/widgets/utils/concurrent.py", line 591, in _on_task_done
super()._on_task_done(future)
File "/home/flavio/repositories/projects/navigating-stories/orange-story-navigator/.venv/lib/python3.9/site-packages/Orange/widgets/utils/concurrent.py", line 547, in _on_task_done
self.on_exception(ex)
File "/home/flavio/repositories/projects/navigating-stories/orange-story-navigator/orangecontrib/storynavigation/widgets/OWSNActorAnalysis.py", line 937, in on_exception
raise ex
File "/home/flavio/.pyenv/versions/3.9.13/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/flavio/repositories/projects/navigating-stories/orange-story-navigator/orangecontrib/storynavigation/widgets/OWSNActorAnalysis.py", line 612, in run
self.valid_stories.append(self.stories[int(storyid)])
File "/home/flavio/repositories/projects/navigating-stories/orange-story-navigator/.venv/lib/python3.9/site-packages/orangecontrib/text/corpus.py", line 549, in __getitem__
c = super().__getitem__(key)
File "/home/flavio/repositories/projects/navigating-stories/orange-story-navigator/.venv/lib/python3.9/site-packages/Orange/data/table.py", line 1168, in __getitem__
return RowInstance(self, key)
File "/home/flavio/repositories/projects/navigating-stories/orange-story-navigator/.venv/lib/python3.9/site-packages/Orange/data/table.py", line 96, in __init__
self.id = table.ids[row_index]
IndexError: index 3 is out of bounds for axis 0 with size 3
table with row selected
widgetData -> Story elements
or Selected data -> Story elements
Data -> Story elements
to Selected Data -> Story elements
, it works but duplicates some stories and creates the error as in #44 Selected data -> Story elements
to Data -> Story elements
, I get the IndexError as abovetable without selected (untouched)
connecting works fine either way. Modifying the connection works, too (can process the data), but it again duplicates the stories -- again similar to #44
Potentially solved with #44 (fix contained in PR #71)
I did not manage to reproduce this error. i can freely switch from Selected Data to Data without any problems. It is better not to have a Data Table between Elements and Actions/Actors. Then the expected links are Story elements to Story elements and there are no ambiguities.
This is more about usability than a bug.Story Navigator version
0.0.18 (commit https://github.com/navigating-stories/orange-story-navigator/commit/8732988e67920716c2eef3eef0af7d6e936da74f)
Orange version
3.36.2
Expected behavior
connecting data table widget to
Actors
andActions
requires different settings. For actors, we do "Selected data -> Story elements", while for actions it is "Data -> story elements" (see screenshot below). This feels counterintuitive. I tried to change either of the two connections, but I then get an error similar to the one in #37Can we use one of the two options for both?
Additional info (worksheets, data, screenshots, ...)