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

table output for actor and actions widgets #38

Open
f-hafner opened this issue Mar 12, 2024 · 3 comments
Open

table output for actor and actions widgets #38

f-hafner opened this issue Mar 12, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@f-hafner
Copy link
Collaborator

f-hafner commented Mar 12, 2024

This is more about usability than a bug.

Story Navigator version

0.0.18 (commit 8732988)

Orange version

3.36.2

Expected behavior

connecting data table widget to Actors and Actions 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 #37

Can we use one of the two options for both?

Additional info (worksheets, data, screenshots, ...)

image

@f-hafner
Copy link
Collaborator Author

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.

@f-hafner f-hafner added the bug Something isn't working label Mar 12, 2024
@kodymoodley
Copy link
Contributor

I suspect this is not a bug with story navigator. @f-hafner could you help me reproduce this error?

@kodymoodley kodymoodley added the workshop-april Task for the April 2024 workshop label Mar 28, 2024
@f-hafner
Copy link
Collaborator Author

f-hafner commented Apr 3, 2024

So, it's quite subtle. It happens when certain connections from table widget to actor widget are modified.

Consider the workflow
image

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.

when first connecting from Import Documents

  • it makes a default connection Selected data -> Story elements. this works fine
  • but then we want to modify the link to Data -> 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

when first connecting from table with row selected widget

when connecting from the widget table 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

@kodymoodley kodymoodley removed the workshop-april Task for the April 2024 workshop label Apr 18, 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