Package: units Version: 2.11-1 Severity: normal Dear Maintainer,
Try to run units_cur to update exchange rates, and I get an error: # units_cur /usr/bin/units_cur:53: RuntimeWarning: Argument <type 'str'> is not an unicode object. Passing an encoded string will likely have unexpected results. ascii = unidecode(names[i]) Traceback (most recent call last): File "/usr/bin/units_cur", line 71, in <module> values = ['1|' + x +' euro' for x in values] TypeError: cannot concatenate 'str' and 'NoneType' objects I tried applying the patch from #767864 / using latest git, but I still get the same error: Traceback (most recent call last): File "./units_cur2", line 71, in <module> values = ['1|' + x +' euro' for x in values] TypeError: cannot concatenate 'str' and 'NoneType' objects Looking at the xml file that units_cur parses it looks like some currencies have no exchange rate: <data> <code>ARS</code> <description>Argentina Peso</description> <rate /> </data> I tried applying a patch like this and it worked, but this means some currencies will just disappear: --- a/units_cur2 +++ b/units_cur2 @@ -38,7 +38,7 @@ sys.exit(1) # print codes here - +currencies = [ x for x in currencies if x.find('code').text != None and x.find('description').text != None and x.find('rate').text != None ] codes = [x.find('code').text for x in currencies] names = [x.find('description').text for x in currencies] values = [x.find('rate').text for x in currencies] -- System Information: Debian Release: 8.0 APT prefers testing APT policy: (900, 'testing'), (500, 'testing-updates'), (500, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) Versions of packages units depends on: ii libc6 2.19-17 ii libreadline6 6.3-8+b3 Versions of packages units recommends: pn python:any <none> units suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org