Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bitbake causes ImportError: cannot import name data #1

Open
hlieberman-gov opened this issue Jan 19, 2018 · 2 comments
Open

bitbake causes ImportError: cannot import name data #1

hlieberman-gov opened this issue Jan 19, 2018 · 2 comments

Comments

@hlieberman-gov
Copy link

Helllo!

It looks like the version of bitbake specified in this config causes a conflict between beautifulsoup and html5lib.

Traceback (most recent call last):
  File "/home/hlieberman/Code/oe-repo/bitbake/bin/bitbake", line 31, in <module>
    import bb
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bb/__init__.py", line 77, in <module>
    from bb import fetch2 as fetch
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bb/fetch2/__init__.py", line 1769, in <module>
    from . import wget
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bb/fetch2/wget.py", line 40, in <module>
    from   bs4 import BeautifulSoup
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bs4/__init__.py", line 30, in <module>
    from .builder import builder_registry, ParserRejectedMarkup
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bs4/builder/__init__.py", line 311, in <module>
    from . import _html5lib
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bs4/builder/_html5lib.py", line 57, in <module>
    class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: 'module' object has no attribute '_base'
/home/hlieberman/Code/oe-repo/bitbake/lib/bb/event.py:118: RuntimeWarning: Parent module 'bb' not found while handling absolute import
  from bb.msg import BBLogFormatter
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bb/event.py", line 118, in print_ui_queue
    from bb.msg import BBLogFormatter
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bb/__init__.py", line 77, in <module>
    from bb import fetch2 as fetch
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bb/fetch2/__init__.py", line 39, in <module>
    from bb import data
ImportError: cannot import name data
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bb/event.py", line 118, in print_ui_queue
    from bb.msg import BBLogFormatter
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bb/__init__.py", line 77, in <module>
    from bb import fetch2 as fetch
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bb/fetch2/__init__.py", line 39, in <module>
    from bb import data
ImportError: cannot import name data
exit 1

I believe this is an instance of https://bugs.launchpad.net/beautifulsoup/+bug/1603299.

@sdunnagan
Copy link

I have the same question.

@black-pigeon
Copy link

black-pigeon commented Oct 19, 2021

Helllo!

It looks like the version of bitbake specified in this config causes a conflict between beautifulsoup and html5lib.

Traceback (most recent call last):
  File "/home/hlieberman/Code/oe-repo/bitbake/bin/bitbake", line 31, in <module>
    import bb
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bb/__init__.py", line 77, in <module>
    from bb import fetch2 as fetch
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bb/fetch2/__init__.py", line 1769, in <module>
    from . import wget
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bb/fetch2/wget.py", line 40, in <module>
    from   bs4 import BeautifulSoup
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bs4/__init__.py", line 30, in <module>
    from .builder import builder_registry, ParserRejectedMarkup
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bs4/builder/__init__.py", line 311, in <module>
    from . import _html5lib
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bs4/builder/_html5lib.py", line 57, in <module>
    class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: 'module' object has no attribute '_base'
/home/hlieberman/Code/oe-repo/bitbake/lib/bb/event.py:118: RuntimeWarning: Parent module 'bb' not found while handling absolute import
  from bb.msg import BBLogFormatter
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bb/event.py", line 118, in print_ui_queue
    from bb.msg import BBLogFormatter
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bb/__init__.py", line 77, in <module>
    from bb import fetch2 as fetch
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bb/fetch2/__init__.py", line 39, in <module>
    from bb import data
ImportError: cannot import name data
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bb/event.py", line 118, in print_ui_queue
    from bb.msg import BBLogFormatter
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bb/__init__.py", line 77, in <module>
    from bb import fetch2 as fetch
  File "/home/hlieberman/Code/oe-repo/bitbake/lib/bb/fetch2/__init__.py", line 39, in <module>
    from bb import data
ImportError: cannot import name data
exit 1

I believe this is an instance of https://bugs.launchpad.net/beautifulsoup/+bug/1603299.

Hi,
Have you sloved this problem? I have the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants