FS#26712 - [urlgrabber] (yum) TypeError: can't multiply sequence by non-int of type 'float'

Attached to Project: Community Packages
Opened by Christopher Schwaab (lpjhjdh) - Tuesday, 01 November 2011, 16:23 GMT
Last edited by Chris Brannon (cmb) - Friday, 18 November 2011, 15:43 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Chris Brannon (cmb)
Architecture All
Severity Low
Priority Low
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
When running urlgrabber it fails with TypeError: can't multiply sequence by non-int of type 'float'. This bug is also recognized by gentoo.
See:
https://bugs.gentoo.org/346753?id=346753
http://patch-tracker.debian.org/package/urlgrabber/3.9.1-4

Additional info:
* package version(s)
3.9.1-2

I have (simply) adapted the patch at http://patch-tracker.debian.org/patch/series/view/urlgrabber/3.9.1-4/grabber_fix.diff to work with the community urlgrabber package.

The attached PKGBUILD with the patch are tested as working on my machine "3.1.0-2-ARCH x86_64" running testing and community-testing.
This task depends upon

Closed by  Chris Brannon (cmb)
Friday, 18 November 2011, 15:43 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Thanks for the report!
Comment by Alexander F. Rødseth (xyproto) - Wednesday, 02 November 2011, 11:36 GMT
What are the steps to reproduce? If I just run "urlgrabber", I don't get an error. x86_64.
Comment by Chris Brannon (cmb) - Wednesday, 02 November 2011, 19:23 GMT
I'd also like to know the steps to reproduce.
That patch looks good, but I'd like to have a good handle on
the problem before I apply the solution.

Thanks,
-- Chris
Comment by Christopher Schwaab (lpjhjdh) - Thursday, 03 November 2011, 15:48 GMT
I can't seem to make it fail with a simple python script but yum will do it (tried copying the failure into mini script but that won't do it either).

$ cat > myyum.conf <<_EOF
[main]
cachedir=/var/cache/yum
logfile=/var/log/yum.log
reposdir=
keepcache=0
debuglevel=2
pkgpolicy=newest
distroverpkg=fedora-release
tolerant=1
exactarch=0
obsoletes=1
gpgcheck=0
plugins=1
retries=4
timeout=60
metadata_expire=1800

[core-13]
name=Fedora Core $releasever - $basearch
failovermethod=priority
mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=fedora-13&arch=i386
enabled=1
metadata_expire=7d

[updates-13]
name=Fedora $releasever - $basearch - Updates
failovermethod=priority
mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=updates-released-f13&arch=i386
enabled=1
metadata_expire=7d
_EOF
$ sudo yum -y -c myyum.conf --installroot=`pwd`/fail install binutils

Since this seems to be the only failure I would avoid yum but unfortunately it's required for some work I am doing.

Thanks.
- Chris
Comment by Christopher Schwaab (lpjhjdh) - Thursday, 03 November 2011, 16:34 GMT
I don't know that it will be of any use but I've attached what I believe to be yum's use of urlgrabber at the time of failure. The only difference is that they (I think) have progress_obj, failure_callback and interrupt_callback set.
Comment by Alexander F. Rødseth (xyproto) - Tuesday, 08 November 2011, 14:34 GMT
"python2 yum-style-grab.py" works here. No errors. Is this a problem with how yum uses urlgrabber, then?
Comment by Christopher Schwaab (lpjhjdh) - Thursday, 17 November 2011, 00:51 GMT
It does seem to be specific to yum. Try as I might I can't seem to get it to crash here with anything else.
Comment by Alexander F. Rødseth (xyproto) - Thursday, 17 November 2011, 10:46 GMT
It seems like yum was recently upgraded. Do you still have this problem with urlgrabber? Thanks.
Comment by Christopher Schwaab (lpjhjdh) - Thursday, 17 November 2011, 16:57 GMT
Just tried a fresh build and seems to still unfortunately be erroring out.
Looking through the yum source it looks like after parsing some xml they don't bother to convert the "size" value they pass into urlgrabber.

For anyone curious:
Under repoMDObject.py:RepoMD.parse(self, elem): line 69 'self.size = child.text'
which propagates to yumRepo.py:YumRepository._retrieveMD(...): line 1611 'self._getFile(..., size=thisdata.size)'
seems it should be 'size=int(thisdata.size)'

I'll make a patch for the AUR package.
Thanks.
Comment by Chris Brannon (cmb) - Friday, 18 November 2011, 15:18 GMT
Ok, so I can close this, right?
Comment by Christopher Schwaab (lpjhjdh) - Friday, 18 November 2011, 15:19 GMT
Think so.
Thanks all.

Loading...