Bug 11977 - bitbake -g -u taskexp <target> raises an import exception
Summary: bitbake -g -u taskexp <target> raises an import exception
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.5
Hardware: x86 Multiple
: Medium minor
Target Milestone: 4.99
Assignee: New Comer Bugs
QA Contact:
URL:
Whiteboard: NEWCOMER
Depends on:
Blocks:
 
Reported: 2017-08-24 19:51 UTC by Leonardo Sandoval Gonzalez
Modified: 2021-01-05 19:43 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leonardo Sandoval Gonzalez 2017-08-24 19:51:17 UTC
When launching the bitbake -g -u taskexp to show task dependencies at UI, the following stack trace shows at command line in my opensuse box.

$ bitbake -g -u taskexp core-image-minimal
Traceback (most recent call last):
  File "/home/lsandov1/poky-testing/poky/bitbake/bin/bitbake", line 48, in <module>
    cookerdata.CookerConfiguration()))
  File "/home/lsandov1/poky-testing/poky/bitbake/lib/bb/main.py", line 372, in bitbake_main
    server_connection, ui_module = setup_bitbake(configParams, configuration)
  File "/home/lsandov1/poky-testing/poky/bitbake/lib/bb/main.py", line 413, in setup_bitbake
    ui_module = import_extension_module(bb.ui, configParams.ui, 'main')
  File "/home/lsandov1/poky-testing/poky/bitbake/lib/bb/main.py", line 106, in import_extension_module
    module = __import__(pkg.__name__, fromlist=[modulename])
  File "/home/lsandov1/poky-testing/poky/bitbake/lib/bb/ui/taskexp.py", line 21, in <module>
    import gi
ImportError: No module named 'gi'
DEBUG: Removed the following variables from the environment: OLDPWD, MINICOM, LS_COLORS, XDG_RUNTIME_DIR, gopher_proxy, LESS, XKEYSYMDB, LESSKEY, HISTSIZE, LS_OPTIONS, HOSTTYPE, SSH_CLIENT, LESS_ADVANCED_PREPROCESSOR, XDG_DATA_DIRS, LIBGL_DEBUG, BUILDDIR, MORE, XDG_CONFIG_DIRS, SSH_SENDS_LOCALE, MACHTYPE, G_FILENAME_ENCODING, FROM_HEADER, HOST, MANPATH, SOCKS5_SERVER, PYTHONSTARTUP, HOSTNAME, SSH_CONNECTION, CSHEDIT, MAIL, OSTYPE, PAGER, SHLVL, LESSCLOSE, INPUTRC, GPG_TTY, SOCKS_PROXY, XNLSPATH, PROFILEREAD, socks_proxy, XDG_SESSION_ID, SSH_TTY, CPU, LESSOPEN, NNTPSERVER, LANG, COLORTERM, _, G_BROKEN_FILENAMES, CONFIG_SITE
lsandov1@yctb05:~/poky-testing/poky/build>
Comment 1 Ross Burton 2017-08-29 14:55:42 UTC
ImportError: No module named 'gi'

You need python-gobject (and GTK+3).

I'm 99% sure this is documented but I guess a nice message would be better than just throwing an exception.
Comment 2 Joshua Lock 2017-12-07 14:48:54 UTC
We should print a message to suggest which modules are missing.
Comment 3 David Khouya 2020-07-01 10:03:14 UTC
Patch was submitted on bitbake-devel
Comment 4 mshah 2021-01-04 06:20:50 UTC
Is this still an open issue? I tried throwing the command "bitbake -g -u taskexp core-image-minimal" but worked fine for me. Tested on branch "dunfell" -> commit hash 16d477fa5d2bec49ccd83ede8249431d30e0c80c.
Comment 6 Randy MacLeod 2021-01-05 19:43:23 UTC
As per David's comment. Thanks everyone!