add exception for old versions of pydot

上级 859bba60
......@@ -952,7 +952,14 @@ def pydotprint(fct, outfile=None,
if return_image:
return g.create(prog='dot', format=format)
else:
g.write(outfile, prog='dot', format=format)
try:
g.write(outfile, prog='dot', format=format)
except pd.InvocationException as e:
# based on https://github.com/Theano/Theano/issues/2988
if map(int, pd.__version__.split(".")) < [1, 0, 28]:
raise Exception("Try upgrading pydot version to a newer one")
raise
if print_output_file:
print('The output file is available at', outfile)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论