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

Problem running test_sbm.py #39

Closed
rougier opened this issue Aug 9, 2018 · 7 comments
Closed

Problem running test_sbm.py #39

rougier opened this issue Aug 9, 2018 · 7 comments

Comments

@rougier
Copy link

rougier commented Aug 9, 2018

Output is:

Using TensorFlow backend.
/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.6 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.7
  return f(*args, **kwds)
Traceback (most recent call last):
  File "test_sbm.py", line 34, in <module>
    G = nx.read_gpickle(file_prefix)
  File "<decorator-gen-404>", line 2, in read_gpickle
  File "/usr/local/lib/python3.7/site-packages/networkx/utils/decorators.py", line 205, in _open_file
    fobj = _dispatch_dict[ext](path, mode=mode)
FileNotFoundError: [Errno 2] No such file or directory: 'sbm.gpickle'
@palash1992
Copy link
Owner

I have now created a "tests" folder with required files. The issue should now be resolved

@rougier
Copy link
Author

rougier commented Aug 9, 2018

Just updated, now I get (OSX / Python 3.7):

Using TensorFlow backend.
/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.6 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.7
  return f(*args, **kwds)
Traceback (most recent call last):
  File "test_sbm.py", line 34, in <module>
    open('data/sbm_node_labels.pickle', 'rb')
UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 512: ordinal not in range(128)

@palash1992
Copy link
Owner

This was caused due to Pickle incompatibility between Python 2 and 3. I have fixed the issue.

@rougier
Copy link
Author

rougier commented Aug 9, 2018

Now I get:

Using TensorFlow backend.
/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.6 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.7
  return f(*args, **kwds)
Traceback (most recent call last):
  File "test_sbm.py", line 35, in <module>
    open('data/sbm_node_labels.pickle', 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'data/sbm_node_labels.pickle'

@palash1992
Copy link
Owner

Should be fixed now. Had renamed the sbm_node_labels for testing the Pickle incompatibility

@rougier
Copy link
Author

rougier commented Aug 9, 2018

Another error now (see below). I think you should test your software starting from a more neutral environment (for example using a virtual environment and cloning your own repo as a "standard" user). This would hep spotting simple errors. I'm leaving on conference for one week and won't be able to test it during that time. You thus have plenty of time to test it more thoroughly.

Using TensorFlow backend.
/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.6 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.7
  return f(*args, **kwds)
Traceback (most recent call last):
  File "test_sbm.py", line 57, in <module>
    print ('Num nodes: %d, num edges: %d' % (G.number_of_nodes(), G.number_of_edges()))
  File "/usr/local/lib/python3.7/site-packages/networkx/classes/graph.py", line 780, in number_of_nodes
    return len(self._node)
AttributeError: 'DiGraph' object has no attribute '_node'

@palash1992
Copy link
Owner

The above error is due to Networkx version incompatibility. You need to install a Networkx version < 2. In the setup, I have modified the networkx version to 1.11. I hope this clears all the issues.

I will clone the repository on some systems to find possible incompatibilities.

@rougier rougier closed this as completed Aug 31, 2018
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

2 participants