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

[Bug]: extraInfo added to trial handler does not appear in wide text output #6047

Open
crcox opened this issue Nov 25, 2023 · 1 comment
Open
Labels
🐞 bug Issue describes a bug (crash or error) or undefined behavior.

Comments

@crcox
Copy link

crcox commented Nov 25, 2023

PsychoPy Version

2023.1.2

What OS are your PsychoPy running on?

Windows 10

Bug Description

A dictionary of extra information provided to a trial handler does not appear when saving using the experiment handler

Expected Behaviour

As when new loops require creating new data types at the experiment level, I expect loop-level metadata (i.e., experiment phase, a name for the loop) to be incorporated into the data returned in the wide-text output.

Steps to Reproduce

  1. Define an experiment handler (with or without extraInfo)
  2. Define a trial handler with extraInfo
  3. Add the trial handler to the experiment handler
  4. Run experiment and observer output

Additional context

This is an aside, but the workflow around the experiment handler and subordinate trial handlers has been difficult to intuit. I am comfortable reading man pages and python source, but even with the demo code provided on GitHub things like "you must add loops as they are needed, rather than add everything to the experiment handler at the start of the experiment" are not obvious until you bash your head against trial indices not registering properly with the experiment handler for an hour or so. I assume the focus is on getting people to use the builder, but just a bit more documentation around these powerful and useful API tools would go a long way, I think.

@crcox crcox added the 🐞 bug Issue describes a bug (crash or error) or undefined behavior. label Nov 25, 2023
@peircej
Copy link
Member

peircej commented Mar 6, 2024

A dictionary of extra information provided to a trial handler does not appear when saving using the experiment handler

I've never had the need to do this so we didn't add that functionality. To me the extraInfo that was originally provided in TrialHandler was superseded by the one in ExperimentHandler

"you must add loops as they are needed, rather than add everything to the experiment handler at the start of the experiment" are not obvious until you bash your head against trial indices not registering properly with the experiment handler for an hour or so.

That isn't by design and I didn't know it was the case ;-)

In general, yes, I do strongly recommend you use Builder instead of hand-writing code. There really isn't a good reason to spend hours banging your head against this, and I think hand-written code usually has more problems than the builder-generated code. If only I could design a study to show that! 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Issue describes a bug (crash or error) or undefined behavior.
Projects
None yet
Development

No branches or pull requests

2 participants