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

Exception with the latest versions of networkx #10

Open
Morwenn opened this issue Dec 29, 2023 · 0 comments
Open

Exception with the latest versions of networkx #10

Morwenn opened this issue Dec 29, 2023 · 0 comments

Comments

@Morwenn
Copy link

Morwenn commented Dec 29, 2023

Hi, I tried to use this library because it seemed like a really useful tool to analyze existing operations graphs, but it seems to be broken by the latest versions of networkx. When trying to call compose, I got the following exception:

    def _optionalized(graph, data):
        """Retain optionality of a `data` node based on all `needs` edges."""
>       all_optionals = all(e[2] for e in graph.out_edges(data, "optional", False))
E       TypeError: OutEdgeView.__call__() takes from 1 to 3 positional arguments but 4 were given

It didn't feel like an issue on my side, so I investigated a bit and found that the signature of some views changed a few months ago in networkx 3.2, with this commit being the most likely culprit: networkx/networkx@edd50e3

Fixing the networkx version to 3.1 solved the issue as expected. Usage of views should probably be adapted in graphtik to accommodate the latest changes in networkx.

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