Thursday, February 16, 2012

./sugar-jhbuild update: 'BundleModule' has no attribute 'parse_from_xml' [solved]

I was trying to build sugar on my fedora 16 (64 bit) box as instructed here [1]. git clone was successful but ./sugar-jhbuild update failed although I have all the dependencies installed. Following is the strange python error I got,

./sugar-jhbuild update
Cloning upstream jhbuild
Cloning into jhbuild...
remote: Counting objects: 30895, done.
remote: Compressing objects: 100% (8597/8597), done.
remote: Total 30895 (delta 23961), reused 28682 (delta 22191)
Receiving objects: 100% (30895/30895), 6.00 MiB | 118 KiB/s, done.
Resolving deltas: 100% (23961/23961), done.
Warning: unknown distro version, automatic fallback to rawhide.
Traceback (most recent call last):
 File "./sugar-jhbuild", line 62, in <module>
   sys.exit(main.main(base_dir, sys.argv[1:]))
 File "/home/kalpa/sugar-devel/sugar-jhbuild/sjhbuild/", line
111, in main
   rc =, config, args, help=lambda:
 File "/home/kalpa/.local/lib/python2.7/site-packages/jhbuild/commands/",
line 123, in run
   return cmd.execute(config, args, help)
 File "/home/kalpa/.local/lib/python2.7/site-packages/jhbuild/commands/",
line 52, in execute
   return, options, args, help)
 File "/home/kalpa/.local/lib/python2.7/site-packages/jhbuild/commands/",
line 63, in run
   module_set = jhbuild.moduleset.load(config)
 File "/home/kalpa/.local/lib/python2.7/site-packages/jhbuild/",
line 316, in load
   ms.modules.update(_parse_module_set(config, uri).modules)
 File "/home/kalpa/.local/lib/python2.7/site-packages/jhbuild/",
line 412, in _parse_module_set
   inc_moduleset = _parse_module_set(config, inc_uri)
 File "/home/kalpa/.local/lib/python2.7/site-packages/jhbuild/",
line 427, in _parse_module_set
   repositories, default_repo)
 File "/home/kalpa/.local/lib/python2.7/site-packages/jhbuild/modtypes/",
line 58, in parse_xml_node
   return parser(node, config, uri, repositories, default_repo)
 File "/home/kalpa/sugar-devel/sugar-jhbuild/sjhbuild/",
line 50, in parse_bundle
   instance = BundleModule.parse_from_xml(node, config, uri,
repositories, default_repo)
AttributeError: type object 'BundleModule' has no attribute 'parse_from_xml'

It took me a couple of days to figure the issue. It all went fine after I removed /home/kalpa/.local/lib/python2.7/site-packages/jhbuild Then all was fine working :-)

In ./sugar-jubuild depscheck there is an warning

Missing packages:

It can be either ignored or install through
yum install gnome-python2-desktop