用python3运行python2如下代码提示Traceback (most recent call last)是什么原因?如何解决? 5
Traceback(mostrecentcalllast):File"/home/ise-344/wxl/LipNet/evaluation/predict.py",li...
Traceback (most recent call last):
File "/home/ise-344/wxl/LipNet/evaluation/predict.py", line 65, in <module>
video, result = predict(sys.argv[1], sys.argv[2])
File "/home/ise-344/wxl/LipNet/evaluation/predict.py", line 27, in predict
video.from_video(video_path)
File "/home/ise-344/wxl/LipNet/lipnet/lipreading/videos.py", line 120, in from_video
frames = self.get_video_frames(path)
File "/home/ise-344/wxl/LipNet/lipnet/lipreading/videos.py", line 196, in get_video_frames
frames = np.array([frame for frame in videogen])
File "/home/ise-344/wxl/LipNet/lipnet/lipreading/videos.py", line 196, in <listcomp>
frames = np.array([frame for frame in videogen])
File "/home/ise-344/tensorflow/venv/lib/python3.6/site-packages/skvideo/io/io.py", line 251, in vreader
reader = FFmpegReader(fname, inputdict=inputdict, outputdict=outputdict, verbosity=verbosity)
File "/home/ise-344/tensorflow/venv/lib/python3.6/site-packages/skvideo/io/ffmpeg.py", line 194, in __init__
self.inputframenum = np.int(check_output(probecmd).split('\n')[0])
TypeError: a bytes-like object is required, not 'str' 展开
File "/home/ise-344/wxl/LipNet/evaluation/predict.py", line 65, in <module>
video, result = predict(sys.argv[1], sys.argv[2])
File "/home/ise-344/wxl/LipNet/evaluation/predict.py", line 27, in predict
video.from_video(video_path)
File "/home/ise-344/wxl/LipNet/lipnet/lipreading/videos.py", line 120, in from_video
frames = self.get_video_frames(path)
File "/home/ise-344/wxl/LipNet/lipnet/lipreading/videos.py", line 196, in get_video_frames
frames = np.array([frame for frame in videogen])
File "/home/ise-344/wxl/LipNet/lipnet/lipreading/videos.py", line 196, in <listcomp>
frames = np.array([frame for frame in videogen])
File "/home/ise-344/tensorflow/venv/lib/python3.6/site-packages/skvideo/io/io.py", line 251, in vreader
reader = FFmpegReader(fname, inputdict=inputdict, outputdict=outputdict, verbosity=verbosity)
File "/home/ise-344/tensorflow/venv/lib/python3.6/site-packages/skvideo/io/ffmpeg.py", line 194, in __init__
self.inputframenum = np.int(check_output(probecmd).split('\n')[0])
TypeError: a bytes-like object is required, not 'str' 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询