improve exception message for old pydot version

上级 fbe2a8bd
...@@ -957,7 +957,9 @@ def pydotprint(fct, outfile=None, ...@@ -957,7 +957,9 @@ def pydotprint(fct, outfile=None,
except pd.InvocationException as e: except pd.InvocationException as e:
# based on https://github.com/Theano/Theano/issues/2988 # based on https://github.com/Theano/Theano/issues/2988
if map(int, pd.__version__.split(".")) < [1, 0, 28]: if map(int, pd.__version__.split(".")) < [1, 0, 28]:
raise Exception("Try upgrading pydot version to a newer one") raise Exception("Old version of pydot detected, which can cause"
" issues with pydot printing. Try upgrading "
"pydot version to a newer one")
raise raise
if print_output_file: if print_output_file:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论