Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 346753 - dev-python/urlgrabber-3.9.1 fails with TypeError: can't multiply sequence by non-int of type 'float'
Summary: dev-python/urlgrabber-3.9.1 fails with TypeError: can't multiply sequence by ...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Python Gentoo Team
Depends on:
Blocks: 302614 309805
  Show dependency tree
Reported: 2010-11-25 13:51 UTC by Tuukka Mäkinen
Modified: 2011-04-06 18:01 UTC (History)
2 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Tuukka Mäkinen 2010-11-25 13:51:26 UTC
While testing mic (meego-image-creator) that I'd just made an ebuild for I got an error from urlgrabber:

* About to connect() to port 80 (#0)
*   Trying 2010-11-25 13:02:02,939 max_size = 34065
max_size = 34065
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/urlgrabber/", line 1522, in _progress_update
    if self._over_max_size(cur=self._amount_read-self._reget_length):
  File "/usr/lib/python2.6/site-packages/urlgrabber/", line 1541, in _over_max_size
    if cur > max_size + max_size*.10:
TypeError: can't multiply sequence by non-int of type 'float'
Comment 1 Tuukka Mäkinen 2010-11-25 13:56:07 UTC
Google search on the error message reveals that Debian has a patch that fixes also this issue. I didn't go through their patch carefully enough to understand what else it does.

The important part for this case is in grabber_fix.diff
@@ -1532,11 +1589,14 @@
     def _over_max_size(self, cur, max_size=None):
         if not max_size:
-            max_size = self.size
-        if self.opts.size: # if we set an opts size use that, no matter what
-            max_size = self.opts.size
+            if not self.opts.size:
+                max_size = self.size
+            else:
+                max_size = self.opts.size
         if not max_size: return False # if we have None for all of the Max then this is dumb
-        if cur > max_size + max_size*.10:
+        if cur > int(float(max_size) * 1.10):
Comment 2 Fabian Köster 2011-01-08 10:57:15 UTC
I am also having this problem and can confirm that the Debian patch works for me.
Comment 3 Andreis Vinogradovs ( slepnoga ) 2011-04-06 14:12:01 UTC
Confirm this bug
Comment 4 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-04-06 14:34:28 UTC
Please test this patch:;a=commitdiff_plain;h=89cc380a2a251a1d2d8b91cf6df170fa546597aa
Comment 5 Maxim Koltsov gentoo-dev 2011-04-06 16:56:35 UTC
(In reply to comment #4)
> Please test this patch:

I managed to construct suitable patch from this and debian's one. If no complains, i commit it in half an our.
Comment 6 Maxim Koltsov gentoo-dev 2011-04-06 18:01:45 UTC
Fixed in tree now

*urlgrabber-3.9.1-r1 (06 Apr 2011)

  06 Apr 2011; Maxim (maksbotan) <>
  +urlgrabber-3.9.1-r1.ebuild, +files/urlgrabber-3.9.1.patch:
  Revision bump, imported upstream patch. Fixes bug #346753