Readthedocs.org: Install requirements.txt failed ERROR: Exception get_topological_weights assert len(weights) == len(graph

Created on 27 Oct 2020  路  25Comments  路  Source: readthedocs/readthedocs.org

Details

Expected Result

Build successful

Actual Result

$ /home/docs/checkouts/readthedocs.org/user_builds/kashgari/envs/v2-dev/bin/python -m pip install --use-feature 2020-resolver --exists-action=w --no-cache-dir -r requirements.dev.txt

Downloading parso-0.7.1-py2.py3-none-any.whl (109 kB)
Building wheels for collected packages: pytest-split, m2r, docopt, livereload, tornado, pyrsistent, pandocfilters
  Building wheel for pytest-split (setup.py): started
  Building wheel for pytest-split (setup.py): finished with status 'done'
  Created wheel for pytest-split: filename=pytest_split-0.1.5-py3-none-any.whl size=5646 sha256=4aab47de10ab9b636072c1a272e2a1af8aae634df78d0647d492d35605f3c254
  Stored in directory: /tmp/pip-ephem-wheel-cache-kds2dbfd/wheels/ed/2b/cc/7bc05f351a54d5691bdcbd5be7ed21a30ce7d7e003431aebd7
  Building wheel for m2r (setup.py): started
  Building wheel for m2r (setup.py): finished with status 'done'
  Created wheel for m2r: filename=m2r-0.2.1-py3-none-any.whl size=10466 sha256=254bc68d63d24647591fad8ebffb61f45c00a53af0348ff9dff439f163dc020c
  Stored in directory: /tmp/pip-ephem-wheel-cache-kds2dbfd/wheels/f0/0d/a1/905017ebb11fce6b0316028bf05fc5c4229fbadff0db60182d
  Building wheel for docopt (setup.py): started
  Building wheel for docopt (setup.py): finished with status 'done'
  Created wheel for docopt: filename=docopt-0.6.2-py2.py3-none-any.whl size=13704 sha256=26a64e1d7ecf0cabdcaddb214f360c7b01c71849f13812bcb8ead5c16e53bdbe
  Stored in directory: /tmp/pip-ephem-wheel-cache-kds2dbfd/wheels/56/ea/58/ead137b087d9e326852a851351d1debf4ada529b6ac0ec4e8c
  Building wheel for livereload (setup.py): started
  Building wheel for livereload (setup.py): finished with status 'done'
  Created wheel for livereload: filename=livereload-2.6.3-py2.py3-none-any.whl size=24713 sha256=cf9900c92425363589f03dcdfa18b4613bde017c203ae5e07e8ab619c00330e5
  Stored in directory: /tmp/pip-ephem-wheel-cache-kds2dbfd/wheels/48/d7/34/372e0521bd5c9f6dcdff307e37ef6f9c00c1e1e2afc9707b5c
  Building wheel for tornado (setup.py): started
  Building wheel for tornado (setup.py): finished with status 'done'
  Created wheel for tornado: filename=tornado-6.0.4-cp38-cp38-linux_x86_64.whl size=427572 sha256=0e2641f6aa45412bc5a8e83bf260bfc3689eb152808e583d55c501e1aa7215eb
  Stored in directory: /tmp/pip-ephem-wheel-cache-kds2dbfd/wheels/88/79/e5/598ba17e85eccf2626eab62e4ee8452895636cd542650d450d
  Building wheel for pyrsistent (setup.py): started
  Building wheel for pyrsistent (setup.py): finished with status 'done'
  Created wheel for pyrsistent: filename=pyrsistent-0.17.3-cp38-cp38-linux_x86_64.whl size=119661 sha256=d3d157775d87b7af23707018debb9464602f10d73dbf49beef695bbd6d7f601a
  Stored in directory: /tmp/pip-ephem-wheel-cache-kds2dbfd/wheels/3d/22/08/7042eb6309c650c7b53615d5df5cc61f1ea9680e7edd3a08d2
  Building wheel for pandocfilters (setup.py): started
  Building wheel for pandocfilters (setup.py): finished with status 'done'
  Created wheel for pandocfilters: filename=pandocfilters-1.4.3-py3-none-any.whl size=7991 sha256=a238c3262e1c671d2cf6f981f4f898a638ebe94b945da427bfa8b4ae6529f804
  Stored in directory: /tmp/pip-ephem-wheel-cache-kds2dbfd/wheels/fc/39/52/8d6f3cec1cca4ceb44d658427c35711b19d89dbc4914af657f
Successfully built pytest-split m2r docopt livereload tornado pyrsistent pandocfilters
ERROR: Exception:
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/kashgari/envs/v2-dev/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 228, in _main
    status = self.run(options, args)
  File "/home/docs/checkouts/readthedocs.org/user_builds/kashgari/envs/v2-dev/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
    return func(self, options, args)
  File "/home/docs/checkouts/readthedocs.org/user_builds/kashgari/envs/v2-dev/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 378, in run
    to_install = resolver.get_installation_order(
  File "/home/docs/checkouts/readthedocs.org/user_builds/kashgari/envs/v2-dev/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 191, in get_installation_order
    weights = get_topological_weights(graph)
  File "/home/docs/checkouts/readthedocs.org/user_builds/kashgari/envs/v2-dev/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 242, in get_topological_weights
    assert len(weights) == len(graph)
AssertionError
Support

All 25 comments

Hi! This doesn't seem to be a problem with Read the Docs but with that package itself. Maybe the Python version you are using is not supported? Or the new pip resolver makes the package to not being able to install?

Are you able to install that package in a similar environment (py38 on Linux and --use-feature 2020-resolver pip argument) locally?

I'm having the exact same issue but with completely different Python packages, except pyrsistent (https://readthedocs.org/projects/worc/builds/12195836/). Between the failed and my previous passed build, the pyrsistent package version is the same however. Hence it may be indeed Read the Docs related. Besides the documentation building, my package works fine.

Note that you have an error earlier in your build @BrikerMan, ERROR: matplotlib 3.3.2 requires pillow>=6.2.0, but you'll have pillow 5.4.1 which is incompatible., which can be solved by not using the system packages. This did however for me not fix the issue.

Successfully built drmaa neuroCombat pyyaml psutil sphinx-argparse autograd autograd-gamma phasepack pyrsistent mpmath docopt
ERROR: Exception:
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/worc/envs/development/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 228, in _main
status = self.run(options, args)
File "/home/docs/checkouts/readthedocs.org/user_builds/worc/envs/development/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
return func(self, options, args)
File "/home/docs/checkouts/readthedocs.org/user_builds/worc/envs/development/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 379, in run
requirement_set
File "/home/docs/checkouts/readthedocs.org/user_builds/worc/envs/development/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 191, in get_installation_order
weights = get_topological_weights(graph)
File "/home/docs/checkouts/readthedocs.org/user_builds/worc/envs/development/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 242, in get_topological_weights
assert len(weights) == len(graph)
AssertionError

@MStarmans91 Thanks, but disabling the system package does not work for me.
@humitos I have tried on ubuntu python 3.8 with --use-feature 2020-resolver, it works without any issue~

This looks like a bug in pip resolver and it seems that it's already fixed. See https://github.com/pypa/pip/issues/9031

As a workaround they said that using pip install --upgrade will solve this issue (I enabled the feature flag pip_always_upgrade) and it seems it worked fine: https://readthedocs.org/projects/kashgari/builds/12207009/

(I did the same for your project @MStarmans91)

The new pip version with this fix is scheduled to be released on Oct, 31.

Please, confirm that the problem is solved for you both. Thanks!

Thanks @humitos for the quick response and solution, I can confirm that this solved the issue for me.

Thanks, I confirm my issue is solved.

@humitos / @stsewd could you enable the flag for us too? We've been seeing the same with ddtrace: https://readthedocs.org/projects/ddtrace/builds/

It doesn't look like that pip release went out yet.

@Kyle-Verhoog I have removed your project from the new pip resolver sample.

https://readthedocs.org/projects/ddtrace/builds/12254239/

Also, the new pip resolver was re-scheduled to be released on November.

@stsewd thank you!

@humitos / @stsewd could you enable the flag for us too? We've been seeing the same with diffupath: https://readthedocs.org/projects/diffupath/builds/12287562/ cc: @josepmarinllao

@humitos / @stsewd

Could you please enable the flag for these two failing projects:
https://readthedocs.org/projects/de-sim/builds/12155064/
https://readthedocs.org/projects/wc-sandbox/builds/

Thanks
Arthur

That was fast! Thanks -- builds now work.

Could you enable the flag for https://readthedocs.org/projects/srslte-docs/builds/ also?

Thanks!!

@stsewd Could you enable the flag for this project: https://readthedocs.org/projects/gosummit/builds/

Hi @stsewd I'm seeing this issue with https://readthedocs.org/projects/ord-schema/builds/ as well; would you mind setting that flag (I don't think the pip fix has gone out yet).

@skearnes done https://readthedocs.org/projects/ord-schema/builds/12406542/. The build is falling for another reason now.

@stsewd could you please enable the flag for https://readthedocs.org/projects/graphtools/builds/ ? Thanks!

@scottgigante I have removed your project from the sample https://readthedocs.org/projects/graphtools/builds/12422033/

@stsewd We're having the same problem: https://readthedocs.org/projects/hendrics/builds/, could you set the flag? Thanks in advance!

Was this page helpful?
0 / 5 - 0 ratings