I am getting this error with graphviz and nothing is working. I am trying to plot a tree from my xgboost, which uses graphviz. I tried doing import graphviz and I get the same error. Any idea how to fix this bug? a previous answer suggested to downgrade graphviz version, but how do I properly do that?
Asked
Active
Viewed 87 times
0
-
It is true that Graphviz does not have an encoding attribute, and almost undoubtedly never has. (all attributes shown here https://graphviz.org/doc/info/attrs.html) Can you determine what is being fed to Graphviz? – sroush Jul 06 '22 at 17:01
-
I am doint a plot_tree from xgboost, so I have no idea what is beign fed into this. But even a simple import graphviz gives the same error – mblume Jul 06 '22 at 17:10
-
Does this answer your question? [how to resolve AttributeError: module 'graphviz.backend' has no attribute 'ENCODING'](https://stackoverflow.com/questions/69989691/how-to-resolve-attributeerror-module-graphviz-backend-has-no-attribute-encod) – albert Jul 07 '22 at 07:52
-
I tried the solution that suggests to download graphviz .19, but it didnt work. The other solution on downgrading the graphviz package to a previous version I am not sure how to do it – mblume Jul 07 '22 at 12:27