GraphWaveFunctionCollapse icon indicating copy to clipboard operation
GraphWaveFunctionCollapse copied to clipboard

networkx 2.5 breaks

Open lamelizard opened this issue 4 years ago • 4 comments

I tried to run the code in the readme:

import networkx as nx
import graphwfc
GI = nx.Graph([(1,2),(2,3),(3,4)])
GI.add_nodes_from([(1,{'c':1}),(2,{'c':1}),(3,{'c':2}),(4,{'c':3})])
GL = nx.DiGraph([(1,2)])
GO = nx.random_tree(1000)

But it raises the following networkx error: AttributeError: 'Graph' object has no attribute 'pred'

I'm using networkx==2.5

Originally posted by @asher-pembroke in https://github.com/lamelizard/GraphWaveFunctionCollapse/issues/1#issuecomment-735341081

lamelizard avatar Nov 29 '20 10:11 lamelizard

Additionally: python -m graphwfc -v value-examples break in 2.5 but work in 2.4 (it breaks in nx.read_graphml) the example code does not even work in 2.1...

lamelizard avatar Nov 29 '20 10:11 lamelizard

I uploaded a new version; while the example code should work now with networkx 2.5, somehow loading of files breaks on 2.5 but works on 2.4. So for the time being we will require <=2.4, I hope that's not an issue for anybody(?). However, this needs a fix eventually.

@asher-pembroke, would you mind trying out the new version to see if everything works now? It works on my machine(TM), but feedback would be appreciated nonetheless.

lamelizard avatar Nov 29 '20 11:11 lamelizard

@lamelizard 2.4 works for me! I'm on windows, btw. I'm fascinated by WFC and am excited to see how it could be used in the graph context. Once I've post my examples once played around with it a little.

Thanks for building this!

asher-pembroke avatar Dec 05 '20 04:12 asher-pembroke

Thank you, that is great to hear. I'll keep this issue open until I can fix the loading issue.

lamelizard avatar Dec 05 '20 09:12 lamelizard