MobleyLab / Lomap

Alchemical mutation scoring map
MIT License
37 stars 17 forks source link

can't read reference graph pickle #43

Closed ppxasjsm closed 5 years ago

ppxasjsm commented 5 years ago

The file "test/basic/molecules.gpickle" does not seem to contain a networkx readable graph. With networkx 2.2 I get an error of:

---------------------------------------------------------------------------
UnicodeDecodeError                        Traceback (most recent call last)
<ipython-input-11-9ad07ad142b9> in <module>
----> 1 nx.read_gpickle('test.gpickle')

<decorator-gen-708> in read_gpickle(path)

~/miniconda3/envs/lomap2/lib/python3.6/site-packages/networkx/utils/decorators.py in _open_file(func_to_be_decorated, *args, **kwargs)
    238         # Finally, we call the original function, making sure to close the fobj
    239         try:
--> 240             result = func_to_be_decorated(*new_args, **kwargs)
    241         finally:
    242             if close_fobj:

~/miniconda3/envs/lomap2/lib/python3.6/site-packages/networkx/readwrite/gpickle.py in read_gpickle(path)
     99     .. [1] https://docs.python.org/2/library/pickle.html
    100     """
--> 101     return pickle.load(path)
    102 
    103 # fixture for nose tests

UnicodeDecodeError: 'ascii' codec can't decode byte 0xd5 in position 2: ordinal not in range(128)

With networkx 1.1 I can read the file, but the resulting graph does not have any graph like attributes, such as edges, nodes and adjacency information.

ppxasjsm commented 5 years ago

I have upgraded to a newer version of the gpickle file.