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

stroop.py crashes #9

Open
chrplr opened this issue Aug 19, 2020 · 1 comment
Open

stroop.py crashes #9

chrplr opened this issue Aug 19, 2020 · 1 comment

Comments

@chrplr
Copy link
Contributor

chrplr commented Aug 19, 2020

(base) chrplr:~/4_code/expyriment-stash/examples/fmri/stroop_task (master)$ python stroop_task.py 
Expyriment 0.10.0 (Python 3.7.7) 
Main file: stroop_task.py (e208b2)
Design plugins:
 StimulationProtocol
Traceback (most recent call last):
  File "/home/cp983411/anaconda3/lib/python3.7/site-packages/expyriment/design/_structure.py", line 1853, in get_factor
    rtn = self._factors[name]
KeyError: 'condition'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "stroop_task.py", line 67, in <module>
    exp.blocks[0] = in_protocol.get_as_experimental_block(block=exp.blocks[0])
  File "/home/cp983411/.expyriment/extras/expyriment_design_extras/stimulationprotocol/_stimulationprotocol.py", line 356, in get_as_experimental_block
    c2 = [t.get_factor("condition") in conditions for t in b.trials]
  File "/home/cp983411/.expyriment/extras/expyriment_design_extras/stimulationprotocol/_stimulationprotocol.py", line 356, in <listcomp>
    c2 = [t.get_factor("condition") in conditions for t in b.trials]
  File "/home/cp983411/anaconda3/lib/python3.7/site-packages/expyriment/design/_structure.py", line 1858, in get_factor
    raise RuntimeError(_FACTOR_NOT_EXIST.format(name))
RuntimeError: The factor 'condition' does not exist!
Use has_factor(name) to check if a factor is defined.
fladd added a commit that referenced this issue Oct 8, 2024
@fladd
Copy link
Member

fladd commented Oct 8, 2024

Should work now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants