Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use write_svg, when two object has the same sequence number. #27

Open
MarievB opened this issue Aug 24, 2023 · 0 comments
Open

Comments

@MarievB
Copy link

MarievB commented Aug 24, 2023

When I use write_svg(), I get the following error:

File "C:\Users\Me\AppData\Roaming\Python\Python39\site-packages\pydotplus\graphviz.py", line 1640, in to_string
    obj_list = sorted([
TypeError: '<' not supported between instances of 'dict' and 'dict'

When I print the objects in the obj_list, I can see that there are several objects with the same sequence number, which leads the sorted() function to compare the objects that are dictionaries, which obviously it cannot. I do not manually change any sequence numbers, so that happens automatically. How do I avoid multiple elements having the same sequence number? I am automatically generating > 19,000 graphs, so manually is not an option :)

Thanks for an otherwise super great package btw!

EDIT: I have "fixed" it locally by just not sorting the obj_list, but I do not really know the consequences of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant