All of lore.kernel.org
 help / color / mirror / Atom feed
* Yocto build error | AttributeError: 'LooseVersion' object has no attribute 'version'
@ 2023-03-23 12:41 Sourabh Hegde
  2023-03-24 10:59 ` [yocto] " Ross Burton
  0 siblings, 1 reply; 4+ messages in thread
From: Sourabh Hegde @ 2023-03-23 12:41 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 3164 bytes --]

Hello,

I am having an issue while building a simple core-image-minimal image. The issue is reported by bitbake. The build machine is remote server with Ubuntu 20.04
Logs:

File "[...]/poky/bitbake/lib/bb/event.py", line 93, in execute_handler
ret = handler(event)
File "[...]/build/../poky/meta/classes/sanity.bbclass", line 1048, in defaultcheck_sanity_eventhandler
check_sanity(sanity_data)
File "[...]/build/../poky/meta/classes/sanity.bbclass", line 1004, in check_sanity
check_sanity_everybuild(status, sanity_data)
File "[...]/build/../poky/meta/classes/sanity.bbclass", line 801, in check_sanity_everybuild
if (LooseVersion(bb.__version__) < LooseVersion(minversion)):
File "/usr/lib/python3.8/distutils/version.py", line 52, in __lt__
c = self._cmp(other)
File "/usr/lib/python3.8/distutils/version.py", line 335, in _cmp
if self.version == other.version:
AttributeError: 'LooseVersion' object has no attribute 'version'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "[...]/poky/bitbake/lib/bb/command.py", line 114, in runAsyncCommand
self.cooker.updateCache()
File "[...]/poky/bitbake/lib/bb/cooker.py", line 1612, in updateCache
bb.event.fire(bb.event.SanityCheck(False), self.databuilder.mcdata[mc])
File "[...]/poky/bitbake/lib/bb/event.py", line 216, in fire
fire_class_handlers(event, d)
File "[...]/poky/bitbake/lib/bb/event.py", line 123, in fire_class_handlers
execute_handler(name, handler, event, d)
File "[...]/poky/bitbake/lib/bb/event.py", line 98, in execute_handler
logger.error("Execution of event handler '%s' failed" % name,
File "/usr/lib/python3.8/logging/__init__.py", line 1475, in error
self._log(ERROR, msg, args, **kwargs)
File "/usr/lib/python3.8/logging/__init__.py", line 1589, in _log
self.handle(record)
File "/usr/lib/python3.8/logging/__init__.py", line 1599, in handle
self.callHandlers(record)
File "/usr/lib/python3.8/logging/__init__.py", line 1661, in callHandlers
hdlr.handle(record)
File "/usr/lib/python3.8/logging/__init__.py", line 954, in handle
self.emit(record)
File "[...]/poky/bitbake/lib/bb/event.py", line 752, in emit
tb = list(bb.exceptions.extract_traceback(tb, context=3))
File "[...]/poky/bitbake/lib/bb/exceptions.py", line 64, in extract_traceback
formatted_args, cls = _get_frame_args(frame)
File "[...]/poky/bitbake/lib/bb/exceptions.py", line 58, in _get_frame_args
formatted = inspect.formatargvalues(*arginfo)
File "/usr/lib/python3.8/inspect.py", line 1296, in formatargvalues
specs.append(convert(args[i]))
File "/usr/lib/python3.8/inspect.py", line 1293, in convert
return formatarg(name) + formatvalue(locals[name])
File "/usr/lib/python3.8/inspect.py", line 1284, in <lambda>
formatvalue=lambda value: '=' + repr(value)):
File "/usr/lib/python3.8/distutils/version.py", line 328, in __repr__
return "LooseVersion ('%s')" % str(self)
File "/usr/lib/python3.8/distutils/version.py", line 324, in __str__
return self.vstring
AttributeError: 'LooseVersion' object has no attribute 'vstring'

Can anyone please let me know what is the issue here and how to resolve this?

[-- Attachment #2: Type: text/html, Size: 4272 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto] Yocto build error | AttributeError: 'LooseVersion' object has no attribute 'version'
  2023-03-23 12:41 Yocto build error | AttributeError: 'LooseVersion' object has no attribute 'version' Sourabh Hegde
@ 2023-03-24 10:59 ` Ross Burton
  2023-03-27  6:26   ` Sourabh Hegde
  0 siblings, 1 reply; 4+ messages in thread
From: Ross Burton @ 2023-03-24 10:59 UTC (permalink / raw)
  To: hrsourabh011; +Cc: yocto

On 23 Mar 2023, at 12:41, Sourabh Hegde via lists.yoctoproject.org <hrsourabh011=gmail.com@lists.yoctoproject.org> wrote:
> I am having an issue while building a simple core-image-minimal image. The issue is reported by bitbake. The build machine is remote server with Ubuntu 20.04
> Logs:

What release of yocto is this?

Ross

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Yocto build error | AttributeError: 'LooseVersion' object has no attribute 'version'
  2023-03-24 10:59 ` [yocto] " Ross Burton
@ 2023-03-27  6:26   ` Sourabh Hegde
  2023-03-27 10:54     ` [yocto] " Ross Burton
  0 siblings, 1 reply; 4+ messages in thread
From: Sourabh Hegde @ 2023-03-27  6:26 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 52 bytes --]

Hello Ross,

I am working with hardknott release

[-- Attachment #2: Type: text/html, Size: 60 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [yocto] Yocto build error | AttributeError: 'LooseVersion' object has no attribute 'version'
  2023-03-27  6:26   ` Sourabh Hegde
@ 2023-03-27 10:54     ` Ross Burton
  0 siblings, 0 replies; 4+ messages in thread
From: Ross Burton @ 2023-03-27 10:54 UTC (permalink / raw)
  To: hrsourabh011; +Cc: yocto

On 27 Mar 2023, at 07:26, Sourabh Hegde via lists.yoctoproject.org <hrsourabh011=gmail.com@lists.yoctoproject.org> wrote:
> 
> Hello Ross,
> 
> I am working with hardknott release 

First, Hardknott has been end-of-life for a year now, please upgrade.

There are two related problems:

AttributeError: 'LooseVersion' object has no attribute 'version'
AttributeError: 'LooseVersion' object has no attribute ‘vstring'

Both of which suggest that LooseVersion.parse() wasn’t called, meaning it was passed a None instead of a string.  At the line before it does the comparison in sanity.bbclass, printing out the value of min_version and bb.__version__ using bb.warn() would be interesting.

Can you share the entire build output, specificially the bitbake version and layer revisions?

Ross

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-27 10:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 12:41 Yocto build error | AttributeError: 'LooseVersion' object has no attribute 'version' Sourabh Hegde
2023-03-24 10:59 ` [yocto] " Ross Burton
2023-03-27  6:26   ` Sourabh Hegde
2023-03-27 10:54     ` [yocto] " Ross Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.