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

At least some Nipype workflows fail with the dev version of networkx installed! #2159

Closed
dPys opened this issue Aug 17, 2017 · 18 comments · Fixed by #2196
Closed

At least some Nipype workflows fail with the dev version of networkx installed! #2159

dPys opened this issue Aug 17, 2017 · 18 comments · Fixed by #2196
Assignees

Comments

@dPys
Copy link

dPys commented Aug 17, 2017

File "/usr/local/lib/python2.7/site-packages/nipype/pipeline/engine/workflows.py", line 586, in run
self._set_needed_outputs(flatgraph)
File "/usr/local/lib/python2.7/site-packages/nipype/pipeline/engine/workflows.py", line 679, in _set_needed_outputs
for edge in graph.out_edges_iter(node):
AttributeError: 'DiGraph' object has no attribute 'out_edges_iter'

@dPys dPys changed the title All Nipype workflows fail with the dev version of networkx installed! At least some Nipype workflows fail with the dev version of networkx installed! Aug 18, 2017
@satra
Copy link
Member

satra commented Aug 24, 2017

@dpisner453 - many thanks for reporting this. i'm assuming networkx had a proper deprecation cycle for this change.

@djarecka - could you please take a stab at this? it would be good to make sure that we are compatible with current and future versions. we don't have to support the future of every library, but to the extent we can it would be good.

@djarecka djarecka self-assigned this Aug 24, 2017
@djarecka
Copy link
Collaborator

@satra - it looks like they removed all *_iter, http://networkx.readthedocs.io/en/latest/release/migration_guide_from_1.x_to_2.0.html.
And nodes() etc., is not a list anymore but dict-like object. Will have to change the way how we ask for nodes from a graph, not sure about ordering yet.

@djarecka
Copy link
Collaborator

@dpisner453 - i've updated nipype, and tests are passing. But if you have any specific example that didn't work for you, i can test it too. You can also try to run with my branch
https://github.com/djarecka/nipype/tree/graphx

@effigies
Copy link
Member

@satra This is now affecting Travis builds.

@djarecka
Copy link
Collaborator

@effigies just rebased my PR, hopefully it works

@djarecka
Copy link
Collaborator

well, it doesn't... some tests are failing with py2.7, 3.5 and 3.6 (3.4 is perfectly fine), will try to fix it today

@oesteban
Copy link
Contributor

For some reason 3.4 keeps networkx < 2. That's good news because it means that we are testing backwards compatibility on your PR :)

@djarecka
Copy link
Collaborator

we can just try to remember when we get errors only for python 3.4 ;-)

@caroleguedj
Copy link

I also have this error with my script...
File "/usr/local/lib/python2.7/site-packages/nipype/pipeline/engine/workflows.py", line 188, in connect
for edge in self._graph.in_edges_iter(destnode):
AttributeError: 'DiGraph' object has no attribute 'in_edges_iter'

Could anybody help me to fix it?

@djarecka
Copy link
Collaborator

djarecka commented Nov 7, 2017

@carolege : are you using the current master?

@caroleguedj
Copy link

I don't really know... I upgrade nipype using pip install...

@djarecka
Copy link
Collaborator

djarecka commented Nov 7, 2017

@carolege , so you're probably using 0.13, you can always the version with this command: python -c "import nipype;print(nipype.__version__)"

So this problem is related to the new version of networkx (you're probably using 2.0) and we updated the code some weeks ago. You can either wait for a new release (should be this week) or try to install our master.

@mgxd
Copy link
Member

mgxd commented Nov 7, 2017

@carolege you can install our current master through pip with the following command

pip install -U https://github.com/nipy/nipype/archive/master.zip

@SebastianSpeer
Copy link

SebastianSpeer commented Nov 7, 2017

Hi, I am experiencing the same problem and installing the master did not help. Are there other suggestions?
I have upgraded nipype to 0.13.1 through conda install instead of pip install. Is that an issue?

@mgxd
Copy link
Member

mgxd commented Nov 7, 2017

@SebastianSpeer yes, the fixed version is not yet available on conda - we will hopefully be releasing a new version this coming week

@djarecka
Copy link
Collaborator

djarecka commented Nov 7, 2017

@SebastianSpeer just to add to @mgxd answer, you will have the same problem when you install the last released version with pip. You can either wait for new version or install master as @mgxd
suggested in an earlier answer

@caroleguedj
Copy link

Thank you, it seems to fix this problem but I have now and other error message:

_Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/nipype/pipeline/plugins/multiproc.py", line 51, in run_node
result['result'] = node.run(updatehash=updatehash)
File "/usr/local/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 407, in run
self._run_interface()
File "/usr/local/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 517, in _run_interface
self._result = self._run_command(execute)
File "/usr/local/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 650, in _run_command
result = self.interface.run()
File "/usr/local/lib/python2.7/site-packages/nipype/interfaces/base.py", line 1101, in run
runtime.traceback_args = ('\n'.join(['%s' % arg for arg in exc_args]),)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 35: ordinal not in range(128)

Do you know from where it could come from?

@caroleguedj
Copy link

Finally, I successfully fix it. Thanks again!!

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

Successfully merging a pull request may close this issue.

8 participants