Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 565730 - www-client/chromium-47.0.2526.49 fails to build - unsupported operand type(s) for +: 'NoneType' and 'str'
Summary: www-client/chromium-47.0.2526.49 fails to build - unsupported operand type(s)...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Chromium Project
URL:
Whiteboard: ht-wanted
Keywords:
: 589614 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-11-13 23:43 UTC by Judson
Modified: 2016-07-26 19:43 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (chromium.emerge.info,7.13 KB, text/plain)
2015-11-13 23:45 UTC, Judson
Details
emerge -pqv (chromium.emerge.pqv,606 bytes, text/plain)
2015-11-13 23:49 UTC, Judson
Details
build log (build.log.bz2,54.38 KB, application/x-bzip)
2015-11-13 23:53 UTC, Judson
Details
catapult-error.patch (catapult-error.patch,627 bytes, patch)
2016-01-23 16:13 UTC, Mike Gilbert
Details | Diff
emerge --info (emerge.info,6.06 KB, text/plain)
2016-04-05 09:57 UTC, Anatoly Verkhovsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Judson 2015-11-13 23:43:53 UTC
Attempting to install chromium-47 from current portage fails with a build error in a Python build tool called catapult. I've tried switching versions of python, which didn't seem to have any effect.



Reproducible: Always

Steps to Reproduce:
1. un-keyword chromium-47
2. emerge -u chromium


Actual Results:  
Build fails with "Exception: While parsing tracing.ui.base.chart_base: unsupported operand type(s) for +: 'NoneType' and 'str"

Expected Results:  
Chromium updated to 47
Comment 1 Judson 2015-11-13 23:45:54 UTC
Created attachment 416880 [details]
emerge --info
Comment 2 Judson 2015-11-13 23:49:01 UTC
Created attachment 416882 [details]
emerge -pqv
Comment 3 Judson 2015-11-13 23:53:59 UTC
Created attachment 416884 [details]
build log
Comment 4 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2016-01-05 19:55:00 UTC
Can you still reproduce this (or anyone else)?

For easier reference, this is the error:

FAILED: cd ../../third_party/catapult/tracing; python bin/generate_about_tracing_contents --outdir ../../../out/Release/gen/content/browser/tracing
Traceback (most recent call last):
  File "bin/generate_about_tracing_contents", line 14, in <module>
    sys.exit(generate_about_tracing_contents.Main(sys.argv))
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/tracing_build/generate_about_tracing_contents.py", line 33, in Main
    load_sequence = vulcanizer.CalcLoadSequenceForModuleNames(names)
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/project.py", line 139, in CalcLoadSequenceForModule
Names
    name in module_names]
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/resource_loader.py", line 140, in LoadModule
    m.Load()
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/html_module.py", line 38, in Load
    super(HTMLModule, self).Load()
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/module.py", line 179, in Load
    module = self.loader.LoadModule(module_name=name)
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/resource_loader.py", line 140, in LoadModule
    m.Load()
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/html_module.py", line 38, in Load
    super(HTMLModule, self).Load()
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/module.py", line 179, in Load
    module = self.loader.LoadModule(module_name=name)
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/resource_loader.py", line 140, in LoadModule
    m.Load()
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/html_module.py", line 38, in Load
    super(HTMLModule, self).Load()
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/module.py", line 179, in Load
    module = self.loader.LoadModule(module_name=name)
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/resource_loader.py", line 140, in LoadModule
    m.Load()
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/html_module.py", line 38, in Load
    super(HTMLModule, self).Load()
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/module.py", line 179, in Load
    module = self.loader.LoadModule(module_name=name)
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/resource_loader.py", line 140, in LoadModule
    m.Load()
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/html_module.py", line 38, in Load
    super(HTMLModule, self).Load()
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/module.py", line 179, in Load
    module = self.loader.LoadModule(module_name=name)
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/resource_loader.py", line 140, in LoadModule
    m.Load()
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/html_module.py", line 38, in Load
    super(HTMLModule, self).Load()
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/module.py", line 179, in Load
    module = self.loader.LoadModule(module_name=name)
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/resource_loader.py", line 140, in LoadModule
    m.Load()
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/html_module.py", line 38, in Load
    super(HTMLModule, self).Load()
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/module.py", line 179, in Load
    module = self.loader.LoadModule(module_name=name)
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/resource_loader.py", line 139, in LoadModule
    m.Parse()
  File "/var/tmp/portage/www-client/chromium-47.0.2526.49/work/chromium-47.0.2526.49/third_party/catapult/tracing/third_party/tvcm/tvcm/html_module.py", line 29, in Parse
    raise Exception('While parsing %s: %s' % (self.name, str(ex)))
Exception: While parsing tracing.ui.base.chart_base: unsupported operand type(s) for +: 'NoneType' and 'str'
ninja: build stopped: subcommand failed.
Comment 5 Judson 2016-01-06 08:16:05 UTC
I can still reproduce this. Happens with www-client/chromium-48.0.2564.41 out of today's portage.
Comment 6 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2016-01-08 11:16:05 UTC
(In reply to Judson from comment #5)
> I can still reproduce this. Happens with www-client/chromium-48.0.2564.41
> out of today's portage.

I tried but couldn't repro.

What python packages do you have installed on your system?

Have you tried running the failing command manually and debugging a bit to figure out what the real error is?
Comment 7 Pistos 2016-01-23 06:03:51 UTC
Still an issue for Chromium 48:

  File "/var/tmp/portage/www-client/chromium-48.0.2564.82/work/chromium-48.0.2564.82/third_party/catapult/third_party/py_vulcanize/py_vulc
anize/html_module.py", line 29, in Parse
    raise Exception('While parsing %s: %s' % (self.name, str(ex)))
Exception: While parsing tracing.ui.base.chart_base: unsupported operand type(s) for +: 'NoneType' and 'str'
ninja: build stopped: subcommand failed.
 * ERROR: www-client/chromium-48.0.2564.82::gentoo failed (compile phase):
Comment 8 Mike Gilbert gentoo-dev 2016-01-23 16:13:35 UTC
Created attachment 423678 [details, diff]
catapult-error.patch

That error message is not very useful because it doesn't show us where the original error occurred.

Please put the attached patch in /etc/portage/patches/www-client/chromium/ and then try building >=chromium-48.0.2564.82. You should still get an error, but the traceback produced should be more useful.

Make sure to attach your build log as well.
Comment 9 Pistos 2016-02-08 16:52:51 UTC
Mike Gilbert:

Thanks for looking into this.  I applied your patch, and here's what came out.  I hope it's more helpful.  There are many more lines above this, but this seemed sufficient to be informative.  I could be wrong, so if you need "all the lines" of the emerge log, I can gist/pastebin them somewhere.

  File "/var/tmp/portage/www-client/chromium-48.0.2564.82/work/chromium-48.0.2564.82/third_party/catapult/third_party/py_vulcanize/py_vulcanize/module.py", line 183, in Load
    module = self.loader.LoadModule(module_name=name)
  File "/var/tmp/portage/www-client/chromium-48.0.2564.82/work/chromium-48.0.2564.82/third_party/catapult/third_party/py_vulcanize/py_vulcanize/resource_loader.py", line 140, in LoadModule
    m.Parse()
  File "/var/tmp/portage/www-client/chromium-48.0.2564.82/work/chromium-48.0.2564.82/third_party/catapult/third_party/py_vulcanize/py_vulcanize/html_module.py", line 30, in Parse
    parser_results = parse_html_deps.HTMLModuleParser().Parse(self.contents)
  File "/var/tmp/portage/www-client/chromium-48.0.2564.82/work/chromium-48.0.2564.82/third_party/catapult/third_party/py_vulcanize/py_vulcanize/parse_html_deps.py", line 225, in Parse
    return HTMLModuleParserResults(html)
  File "/var/tmp/portage/www-client/chromium-48.0.2564.82/work/chromium-48.0.2564.82/third_party/catapult/third_party/py_vulcanize/py_vulcanize/parse_html_deps.py", line 98, in __init__
    self._soup = bs4.BeautifulSoup(html, 'html5lib')
  File "/usr/lib64/python2.7/site-packages/bs4/__init__.py", line 172, in __init__
    self._feed()
  File "/usr/lib64/python2.7/site-packages/bs4/__init__.py", line 185, in _feed
    self.builder.feed(self.markup)
  File "/usr/lib64/python2.7/site-packages/bs4/builder/_html5lib.py", line 37, in feed
    doc = parser.parse(markup, encoding=self.user_specified_encoding)
  File "/usr/lib64/python2.7/site-packages/html5lib/html5parser.py", line 224, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/usr/lib64/python2.7/site-packages/html5lib/html5parser.py", line 93, in _parse
    self.mainLoop()
  File "/usr/lib64/python2.7/site-packages/html5lib/html5parser.py", line 187, in mainLoop
    new_token = phase.processStartTag(new_token)
  File "/usr/lib64/python2.7/site-packages/html5lib/html5parser.py", line 2429, in processStartTag
    self.tree.insertElement(token)
  File "/usr/lib64/python2.7/site-packages/html5lib/treebuilders/_base.py", line 291, in insertElementNormal
    element.attributes = token["data"]
  File "/usr/lib64/python2.7/site-packages/bs4/builder/_html5lib.py", line 147, in setAttributes
    new_name = NamespacedAttribute(*name)
  File "/usr/lib64/python2.7/site-packages/bs4/element.py", line 30, in __new__
    obj = unicode.__new__(cls, prefix + ":" + name)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
<built-in>:0:0: note: this is the location of the previous definition
ninja: build stopped: subcommand failed.
Comment 10 Anatoly Verkhovsky 2016-04-04 12:27:26 UTC
I've had the same issue (with chromium-49.0.2623.108) and it was resolved by 

emerge -v1 beautifulsoup html5lib lxml

Apparently one of those 3 packages is buggy.
Comment 11 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2016-04-04 21:29:51 UTC
(In reply to Anatoly Verkhovsky from comment #10)
> I've had the same issue (with chromium-49.0.2623.108) and it was resolved by 
> 
> emerge -v1 beautifulsoup html5lib lxml
> 
> Apparently one of those 3 packages is buggy.

Could you please provide working versions of this packages, your emerge --info, and if possible the broken (previous) versions as well (e.g. from emerge log, qlop, etc).
Comment 12 Anatoly Verkhovsky 2016-04-05 09:57:01 UTC
Created attachment 429672 [details]
emerge --info
Comment 13 Anatoly Verkhovsky 2016-04-05 09:59:04 UTC
new versions:
Mon Apr  4 14:15:27 2016 >>> dev-python/html5lib-0.9999999
Mon Apr  4 14:17:14 2016 >>> dev-python/lxml-3.5.0
Mon Apr  4 14:18:42 2016 >>> dev-python/beautifulsoup-4.3.2

previous versions:
Mon Mar 21 20:19:35 2016 >>> dev-python/html5lib-0.9999999
Tue Mar 22 11:12:33 2016 >>> dev-python/lxml-3.4.4
Thu Dec 18 17:45:59 2014 >>> dev-python/beautifulsoup-3.2.1-r1

Must be something the the soup...
Comment 14 Mike Gilbert gentoo-dev 2016-04-05 14:48:30 UTC
(In reply to Anatoly Verkhovsky from comment #13)

beautifulsoup is slotted.

dev-python/beautifulsoup:python-2 -> 3.2.1-r1
dev-python/beautifulsoup:4 -> 4.3.2

Probably this was fixed by reinstalling beautifulsoup:4.
Comment 15 Anatoly Verkhovsky 2016-04-05 16:03:23 UTC
Ah, that correct,

i've had an earlier version beautifulsoup:4 installed

     Mon May 13 14:12:02 2013 >>> dev-python/beautifulsoup-4.1.3-r1

This one is even older.
Comment 16 Mike Gilbert gentoo-dev 2016-04-05 16:37:56 UTC
dev-python/beautifulsoup-4.1.3-r1 is no longer in the tree, so I cannot easily test it.

To be safe, we could depend on >=dev-python/beautifulsoup-4.3.2:4 to force people an upgrade. This upgrade might otherwise get missed if you use the default emerge --with-bdeps=n setting.
Comment 17 Pistos 2016-04-05 20:33:57 UTC
Emerging beautifulsoup html5lib lxml fixed this for me.  Thank you, Anatoly!
Comment 18 Judson 2016-04-09 19:52:23 UTC
This fix also worked for me - at least for chromium-49, which is all I really wanted in the first place.
Comment 19 Mike Gilbert gentoo-dev 2016-07-25 03:07:29 UTC
Please don't mark bugs resolved before we actually fix them.
Comment 20 Mike Gilbert gentoo-dev 2016-07-25 03:08:29 UTC
*** Bug 589614 has been marked as a duplicate of this bug. ***
Comment 21 Mike Gilbert gentoo-dev 2016-07-25 03:15:42 UTC
Hopefully this resolves it.

commit 646dcef85e4b850faf4b5a2726d411608def47aa
Author: Mike Gilbert <floppym@gentoo.org>
Date:   Sun Jul 24 23:11:05 2016 -0400

    www-client/chromium: depend on a recent version of bs4
    
    Old versions seem to be incompatible.
    
    Bug: https://bugs.gentoo.org/565730
    Package-Manager: portage-2.3.0_p15

 www-client/chromium/chromium-52.0.2743.82.ebuild | 4 ++--
 www-client/chromium/chromium-53.0.2785.21.ebuild | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 22 Yuriy Rusinov 2016-07-26 19:43:04 UTC
Today www-client/chromium-52.0.2743.82 successfully compiledd