Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by


Dear Expyriment's expert,

I work on a project where I'll need to use a touchscreen.
I found that the example that you've got : line-bisection.py doesn't work on my computer and laptop.
I've got this error:

ImportError: cannot import name defaults

Do I get this error because it was written with an older version of expyriment ?
Do you have another example ?


  • fladdfladd Posts: 96

    Can you give me the full error message?

    My suspicion is that you have a file called test.py in the same directory, leading to overwriting the internal test package from future (which is a new dependency of Expyriment 0.9.0).

    Florian Krause (Developer)

  • My mistake (I had a test.py), I think we can delete this discussion.

  • fladdfladd Posts: 96

    Glad to hear it is resolved. No need to delete the discussion though. Might be helpful for others in the future.


    Florian Krause (Developer)

  • Ok, I think we can continue with this discussion since I've got a new error with this script.
    I get this message:

    File "line-bisection.py", line 77, in <module>
      File "...expyriment/io/_touchscreenbuttonbox.py", line 170, in show
      File "...expyriment/io/_touchscreenbuttonbox.py", line 156, in create
        raise RuntimeError("No button field defined!")
    RuntimeError: No button field defined!

    Thank you in advance for your help

  • oliveroliver Posts: 10

    This is indeed a bug in Expyriment 0.9. It has something to do with newly introduced Python3 compatibility. I have fixed it and the issue will be therefore solved with the next Expyriment release.

    We will come back to you very soon for a temporary solution, which you can apply in the mean time.

  • fladdfladd Posts: 96

    Dear Arnaud,

    you could use the current development version of Expyriment (which has the bug already fixed):

    • Download the source archive
    • Unzip the source archive
    • In the command line navigate into the unzipped directory and call:
      python setup.py install

    Florian Krause (Developer)

Sign In or Register to comment.