navigating-stories / orange-story-navigator

Add-on to the Orange3 data mining toolkit with text processing widgets from the project Navigating Stories
https://research-software-directory.org/projects/navigating-stories
Other
2 stars 2 forks source link

add error when input channel is not corpus #56

Closed f-hafner closed 2 months ago

f-hafner commented 3 months ago
Issue

Workaround to fix #42

Description of changes
Questions
Includes
kodymoodley commented 3 months ago

Nice @f-hafner! The message works for the inputs / outputs you give in your example. This case:

image

...But it doesn't work in this case:

image

It should throw an error message there too.

There is another minor issue, the error message does not go away once you correct the input: image

Otherwise I think your general solution is very nice and practical!

Regarding your questions, indeed also check for story_elements and also apply the same solution to action widget.

f-hafner commented 3 months ago

@kodymoodley , I fixed as you suggested, both for Actors and Actions.

There is a message residual_error in error_handling.py. It was intended to capture other errors when data are processed, but it's dfficult to capture all edge cases, and I'm not sure it's the best way to deal with such errors anyway. If you disagree, we can discuss how this should be incorporated. If you want me to remove the message, let me know. Otheriwse this can be merged from my side.