Multiqc: TypeError: add_edge() takes 3 positional arguments but 4 were given

Created on 21 Sep 2017  路  6Comments  路  Source: ewels/MultiQC

Description of bug:
Multiqc breaks when running the command multiqc .

MultiQC Error log:

Traceback (most recent call last):
  File "/home/ubuntu/py3/bin/multiqc", line 33, in <module>
    from multiqc.plots import table
  File "/home/ubuntu/py3/lib/python3.5/site-packages/multiqc/plots/table.py", line 9, in <module>
    from multiqc.utils import config, report, util_functions, mqc_colour
  File "/home/ubuntu/py3/lib/python3.5/site-packages/multiqc/utils/mqc_colour.py", line 7, in <module>
    import spectra
  File "/home/ubuntu/py3/lib/python3.5/site-packages/spectra/__init__.py", line 1, in <module>
    from .core import COLOR_SPACES, Color, Scale
  File "/home/ubuntu/py3/lib/python3.5/site-packages/spectra/core.py", line 1, in <module>
    from colormath import color_objects, color_conversions
  File "/home/ubuntu/py3/lib/python3.5/site-packages/colormath/color_conversions.py", line 167, in <module>
    def Spectral_to_XYZ(cobj, illuminant_override=None, *args, **kwargs):
  File "/home/ubuntu/py3/lib/python3.5/site-packages/colormath/color_conversions.py", line 159, in decorator
    _conversion_manager.add_type_conversion(start_type, target_type, f)
  File "/home/ubuntu/py3/lib/python3.5/site-packages/colormath/color_conversions.py", line 125, in add_type_conversion
    self.conversion_graph.add_edge(start_type, target_type, {'conversion_function': conversion_function})
TypeError: add_edge() takes 3 positional arguments but 4 were given
  • Command used to run MultiQC

    • multiqc .

  • MultiQC Version:

    • MultiQC v.1.2

  • Operating System:

    • Ubuntu 16.04

  • Python Version:

    • Python 3.5.2

  • Method of MultiQC installation:

    • pip

error is resolved with development version

bug

Most helpful comment

This issue can be circumvented with virtualenv and pip:

virtualenv ~/bin/MultiQC-1.2
source ~/bin/MultiQC-1.2/bin/activate
pip install networkx==1.11
pip install multiqc==1.2

All 6 comments

Thanks for reporting this @brooksph, this is a known issue in a downstream dependency. As you say - it's fixed in the 1.3dev version of MultiQC (by forcing the installation to use an old version of a package) and I was hoping that the people responsible for the downstream packages would sort everything out before this became a problem. However it looks like the networkx v2.0 release is now out properly and the colormath package still hasn't had a release pushed to PyPI. For now this means that I should try to get MultiQC v1.3 release as soon as possible as this is the only thing we can do.

I'll try to get through all of the currently open pull-requests and then once I'm happy that the code is stable I'll try to push a release in the coming days.

Ping @vladsaveliev

This issue can be circumvented with virtualenv and pip:

virtualenv ~/bin/MultiQC-1.2
source ~/bin/MultiQC-1.2/bin/activate
pip install networkx==1.11
pip install multiqc==1.2

This is fixed in the v1.3 release which is about to go out, so closing this issue now.

@ewels Colormath 3.0 is now out and works with NetworkX 2.0+. The dependencies of Multiqc, I believe, can now be changed to reflect this. See https://pypi.python.org/pypi/colormath.

Addendum...
Spectra may still be a problem. I'm not sure that the Spectra devs wrote Colormath 2.1.1 as a dep due to the NetworkX issue or because of some other issue, but...

$ pipdeptree -r -p colormath
Warning!!! Possibly conflicting dependencies found:
* spectra==0.0.9
 - colormath [required: ==2.1.1, installed: 3.0.0]
 - networkx [required: ==1.11, installed: 2.0]
* multiqc==1.3
 - networkx [required: <2, installed: 2.0]

Addendum...
I could have determined this from the traceback above, but it looks like the Spectra deps were based on Colormath's incompatibility with NetworkX 2.0 as well. I've let the dev know at https://github.com/jsvine/spectra/issues/8

Great stuff - thanks for the detective work @jwhite007! Let me know if there are any updates with spectra and I'll update MultiQC accordingly.

Phil

Thanks again @jwhite007 - the new spectra release now works properly with colormath and networkx. Unfortunately this release also breaks the MultiQC installation:

Installed /home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/colormath-3.0.0-py2.7.egg
error: networkx 1.11 is installed but networkx==2.0 is required by set(['spectra'])

The command "python setup.py install" failed and exited with 1 during .

I've updated the requirements in 479cfad2d1c57d42761712870ed9a10931485c84 and will push a new release to address this asap.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vladsaveliev picture vladsaveliev  路  7Comments

pellonen picture pellonen  路  8Comments

choudharis2 picture choudharis2  路  7Comments

boulund picture boulund  路  4Comments

lbeltrame picture lbeltrame  路  5Comments