ImportError: cannot import name time

730 views
Skip to first unread message

Katelyn Wills

unread,
Jun 6, 2016, 1:43:44 PM6/6/16
to psychopy-users
Hello,

I am new to Python and PsychoPy.   I've been going through tutorials and making mini-experiments to learn, and it was going well until I went to work on it today.  I have no idea what happened, but now I can't run anything.  The output shows the following error:

  File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/core.py", line 7, in <module>
    import sys, threading
  File "threading.pyc", line 15, in <module>
ImportError: cannot import name time

Can anyone please help me to understand what might be causing this and how I can fix it so my experiments will run again?

Thank you!

Katelyn Wills


Oliver Clark

unread,
Jun 7, 2016, 10:27:49 AM6/7/16
to psychopy-users
Hello and welcome!

It looks like you've opened the .pyc file
rather than the .py file - common problem! If this isn't the case you'll need to provide some more information about your study!

Bw

Oli

Jon Peirce

unread,
Jun 8, 2016, 5:40:09 PM6/8/16
to psychop...@googlegroups.com

I wonder if you have a folder called `time` or a file called time.py where you're trying to run your study? That could confuse Python because it should be trying to import the time module (from within Python) but it tries to import your file/folder instead? Just a stab in the dark

Jon

--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/9ddbba52-2a49-4cdb-b951-a82fe5db26da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Jon Peirce
http://www.peirce.org.uk
Reply all
Reply to author
Forward
0 new messages