varigit / var-host-docker-containers

12 stars 20 forks source link

Wrong python version in Dockerfile #2

Closed lszczuro closed 1 year ago

lszczuro commented 1 year ago

Using bitbake fsl-image-gui on Ubuntu 22.04 resulting an error:

Traceback (most recent call last):
  File "/workdir/sources/poky/bitbake/bin/bitbake", line 19, in <module>
    import bb
  File "/workdir/sources/poky/bitbake/lib/bb/__init__.py", line 75, in <module>
    import bb.msg
  File "/workdir/sources/poky/bitbake/lib/bb/msg.py", line 19, in <module>
    import bb.event
  File "/workdir/sources/poky/bitbake/lib/bb/event.py", line 22, in <module>
    import bb.compat
  File "/workdir/sources/poky/bitbake/lib/bb/compat.py", line 7, in <module>
    from collections import MutableMapping, KeysView, ValuesView, ItemsView, OrderedDict
ImportError: cannot import name 'MutableMapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

This is because Dockerfile define latest version of python, and MutableMapping is moved to collections.abc in Python 3.10

https://stackoverflow.com/questions/70870041/cannot-import-name-mutablemapping-from-collections

nsdrude commented 1 year ago

@lszczuro please write the full steps to reproduce the problem, including which Yocto release you are building.