pnnl / HyperNetX

Python package for hypergraph analysis and visualization.
https://hypernetx.readthedocs.io
Other
536 stars 92 forks source link

About the function "to_pickle", now the version 2.0.3 not support the save function? #120

Open q923397935 opened 1 year ago

q923397935 commented 1 year ago
scenes = {
    0: ('FN', 'TH'),
    1: ('TH', 'JV'),
    2: ('BM', 'FN', 'JA'),
    3: ('JV', 'JU', 'CH', 'BM'),
    4: ('JU', 'CH', 'BR', 'CN', 'CC', 'JV', 'BM'),
    5: ('TH', 'GP'),
    6: ('GP', 'MP'),
    7: ('MA', 'GP')
}

H = hnx.Hypergraph(scenes)
H
hnx.to_pickle(H, filename='1.pkl')

File D:\Anaconda\envs\mhyperG\lib\site-packages\hypernetx\read_write.py:10, in to_pickle(obj, filename) 8 """Writes object to a pickle file""" 9 with open(f"{filename}", "wb") as f: ---> 10 pickle.dump(obj, f)

TypeError: 'NoneType' object is not callable How can I fix the bug?