2022-10-24

ValueError: Namespace Soup not available

Pumpkin Soup

I ran into this error several times recently while trying to run a few Python-based GTK apps. Here's how I solved the problem.

Running the application from a command line produced the following traceback:

Dirs searched: [PosixPath('/home/user/.local/share'), PosixPath('/usr/local/share'), PosixPath('/usr/share')]
Traceback (most recent call last):
  File "/home/user/virtualenv/bin/app", line 8, in <module>
    sys.exit(main())
  File "/home/user/virtualenv/lib/python3.9/site-packages/app/app.py", line 158, in main
    _check_required_deps()
  File "/home/user/virtualenv/lib/python3.9/site-packages/app/app.py", line 50, in _check_required_deps
    import nbxmpp
  File "/home/user/virtualenv/lib/python3.9/site-packages/nbxmpp/__init__.py", line 5, in <module>
    gi.require_version('Soup', '2.4')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 126, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Soup not available

The fix for Debian-based systems it to install some gir soup package, for me it was gir1.2-soup-2.4.

0 comments

Reply

Cancel reply
Markdown. Syntax highlighting with <code lang="php"><?php echo "Hello, world!"; ?></code> etc.
DjangoPythonBitcoinTuxDebianHTML5 badgeSaltStackUpset confused bugMoneyHackerUpset confused bugX.OrggitFirefoxWindowMakerBashIs it worth the time?i3 window managerWagtailContainerIrssiNginxSilenceUse a maskWorldInternet securityPianoFontGnuPGThunderbirdJenkinshome-assistant-logo