Errno 24使用Psychopy时打开的文件过多

时间:2018-06-26 14:01:56

标签: psychopy movies

我有40个我想随机播放15次的视频。即使实验一直运行到我的.csv文件,输出也不会保存,并且我收到一个错误消息,说打开了太多文件

如果我将重复次数更改为5,它将起作用并保存所有数据。

任何高于5的错误都会显示错误[Errno 24]打开的文件太多,仅保存了.log文件。

是否有一段代码可以添加到我的.py文件中,以在显示每个文件后关闭它们?还是操作系统问题?我使用Windows7。非常感谢任何想法。

在整个输出消息下方。

################## Running: F:\Movies\Block 1_lastrun.py ##################
Traceback (most recent call last):
File “U:\Final draft\Block 1_lastrun.py”, line 189, in
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\visual\movie3.py”, line 134, in init
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\visual\movie3.py”, line 180, in loadMovie
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\moviepy\video\io\VideoFileClip.py”, line 81, in init
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\moviepy\video\io\ffmpeg_reader.py”, line 32, in init
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\moviepy\video\io\ffmpeg_reader.py”, line 256, in ffmpeg_parse_infos
File “C:\Program Files (x86)\PsychoPy2\lib\subprocess.py”, line 745, in    init
OSError: [Errno 24] Too many open files
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File “C:\Program Files (x86)\PsychoPy2\lib\atexit.py”, line 24, in _run_exitfuncs
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\data\experiment.py”, line 366, in close
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\data\experiment.py”, line 351, in saveAsPickle
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\tools\filetools.py”, line 149, in openOutputFile
File “C:\Program Files (x86)\PsychoPy2\lib\codecs.py”, line 896, in open
IOError: [Errno 24] Too many open files: u’U:\Final draft\data/_BM-Stimulation_2018_Jun_13_1535.psydat’
Error in sys.exitfunc:
Traceback (most recent call last):
File “C:\Program Files (x86)\PsychoPy2\lib\atexit.py”, line 24, in _run_exitfuncs
func(*targs, **kargs)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\data\experiment.py”, line 366, in close
self.saveAsPickle(self.dataFileName)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\data\experiment.py”, line 351, in saveAsPickle
fileCollisionMethod=fileCollisionMethod) as f:
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\tools  \filetools.py”, line 149, in openOutputFile
f = codecs.open(fileName, mode=mode, encoding=encoding)
File “C:\Program Files (x86)\PsychoPy2\lib\codecs.py”, line 896, in open
file = builtin.open(filename, mode, buffering)
IOError: [Errno 24] Too many open files: u’F:\Movies\data/_BM-     Stimulation_2018_Jun_26_1533.psydat’

0 个答案:

没有答案