Closed ctreffe closed 4 months ago
So that means, instead of aborting in a controlled way, the experiment crashes?
Exactly. Sorry, I cropped to much of the console output, the experiment returns a 500 server error when this happens.
Sounds like a bug to me. The AbortMove
exception should be handled, and the experiment should be aborted in a controlled way. I'll look into it 👍
Alright, many thanks. This is not high on my priority list, however. I will use on_exp_access for the time being.
Ok, I found out what went wrong. The issue occurs only if you abort in an on_first_show
or on_each_show
hook on the first page, because the AbortMove
exception was not handled during experiment startup. The issue is fixed in https://github.com/ctreffe/alfred/pull/268
Based on the alfred3 documentation, I expect to be able to abort an experiment from every page and every page hook. However, the following code works as expected in a single page experiment when using the _on_expaccess hook, but not when using _on_firstshow or _on_everyshow:
Changing _on_expaccess to either _on_firstshow or _on_everyshow yields the following error:
I think this might be a bug or maybe we need to outline relevant limitations on the usage of the abort() method?