Skip to content

RuntimeWarning: networkx backend defined more than once: nx-loopback #37863

@mkoeppe

Description

@mkoeppe

Seen in portability tests for Redhat-like systems, such as almalinux-8-python3.9-minimal
https://github.com/mkoeppe/sage/actions/runs/8761823524/job/24053541285#step:11:4182

sage -t --random-seed=135671911764218086922490879021813737906 src/doc/en/thematic_tutorials/sandpile.rst
#25 608.2 **********************************************************************
#25 608.2 File "src/doc/en/thematic_tutorials/sandpile.rst", line 851, in doc.en.thematic_tutorials.sandpile
#25 608.2 Failed example:
#25 608.2     S = Sandpile(digraphs.RandomDirectedGNC(6), 0)
#25 608.2 Expected nothing
#25 608.2 Got:
#25 608.2     doctest:warning
#25 608.2       File "<doctest doc.en.thematic_tutorials.sandpile[98]>", line 1, in <module>
#25 608.2         S = Sandpile(digraphs.RandomDirectedGNC(Integer(6)), Integer(0))
#25 608.2       File "/sage/src/sage/graphs/digraph_generators.py", line 1421, in RandomDirectedGNC
#25 608.2         import networkx
#25 608.2       File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
#25 608.2       File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
#25 608.2       File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
#25 608.2       File "<frozen importlib._bootstrap_external>", line 850, in exec_module
#25 608.2       File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
#25 608.2       File "/sage/local/var/lib/sage/venv-python3.9/lib64/python3.9/site-packages/networkx/__init__.py", line 20, in <module>
#25 608.2         from networkx.utils.backends import _dispatch
#25 608.2       File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
#25 608.2       File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
#25 608.2       File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
#25 608.2       File "<frozen importlib._bootstrap_external>", line 850, in exec_module
#25 608.2       File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
#25 608.2       File "/sage/local/var/lib/sage/venv-python3.9/lib64/python3.9/site-packages/networkx/utils/backends.py", line 135, in <module>
#25 608.2         backends.update(_get_backends("networkx.backends"))
#25 608.2       File "/sage/local/var/lib/sage/venv-python3.9/lib64/python3.9/site-packages/networkx/utils/backends.py", line 110, in _get_backends
#25 608.2         warnings.warn(
#25 608.2       File "/usr/lib64/python3.9/warnings.py", line 109, in _showwarnmsg
#25 608.2         sw(msg.message, msg.category, msg.filename, msg.lineno,
#25 608.2     :
#25 608.2     RuntimeWarning: networkx backend defined more than once: nx-loopback

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions