我正在学习如何用Python编程,并且一直在阅读Langtangen的“关于用Python进行科学编程的入门”。这本书指的是一个网站,其中有书籍示例或工作代码示例/程序(http://hplgit.github.io/scipro-primer/),其中也有一些使用SciTools (EasyViz),生成几个情节,然后尝试将它们保存在.gif文件中(我猜这是电影的默认输出格式)。
问题是,当我运行这些程序时,会得到一个错误。我看到了通过改变数字的演变过程,但是当程序应该将这些.png文件保存到电影中时,我会得到以下错误消息:
Found 73 files of the format tmp_*.png.
scitools.easyviz.movie function runs the command:
convert -delay 50 tmp_*.png tmp_heatwave.gif
Invalid Parameter - 50
scitools.easyviz.movie could not make movie
Traceback (most recent call last):
File "D:\Workspaces\Eclipse Python Workspace\Book Examples\src\plot\heatwave.py", line 41, in <module>
output_file='tmp_heatwave.gif')
File "C:\Python27\lib\site-packages\scitools\easyviz\movie.py", line 1151, in movie
me.encode()
File "C:\Python27\lib\site-packages\scitools\easyviz\movie.py", line 153, in encode
raise SystemError('Check error messages from the encoder in the terminal window')
SystemError: Check error messages from the encoder in the terminal window我查看了电影模块中的代码,参数50似乎是指fps中的延迟。例如,在另一个示例程序中,它被设置为4,您还会得到相同的返回消息。如果我删除在SciTools包中实现的模块中的延迟线,错误将是:
Invalid Parameter - tmp_heatwave.gif有人能告诉我发生了什么事吗?我没有改变代码,我相信它是正确的,但我不能保存电影,我应该这样做!
发布于 2013-10-15 01:20:52
我遇到了同样的麻烦(也是从同一本书中学到的)。
对我来说,这是在我运行bisection_movie.py文件时发生的。
就我的情况而言,我解决问题的方式如下:
No such file or directory @ error/ps.c/ReadPSImage/837我建议先安装ghostscript委托库,然后检查是否足够。如果是的话,请回发它起作用了,所以我知道我所做的所有该死的事情,是什么使代码工作。
https://stackoverflow.com/questions/17640787
复制相似问题