Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 505076 - app-admin/conkyforecast 2.24 fails to load the location cache: ERROR: Error reading weather data: too many values to unpack
Summary: app-admin/conkyforecast 2.24 fails to load the location cache: ERROR: Error r...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard: removal on 2020-08-28
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-03-19 09:15 UTC by Michele Testa
Modified: 2020-07-29 16:55 UTC (History)
2 users (show)

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


Attachments
A simple patch to solve this issue (conkyForecast.py.too_many_values_to_unpack.patch,651 bytes, patch)
2014-03-19 09:22 UTC, Michele Testa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michele Testa 2014-03-19 09:15:25 UTC
Due to a change in weather.com API, conkyForecast fails to retrieve location details for specific locations.

Reproducible: Always

Steps to Reproduce:
on your favourite shell, run:
$ conkyForecast -v

Actual Results:  
... some lines skipped ...
ERROR: Error reading weather data: too many values to unpack
ERROR: Location <your location ID here> is not in cache.
ERROR: Failed to load the location cache
ERROR: Location <your location ID here> is not in cache.
ERROR: Failed to load the location cache


Expected Results:  
INFO: Locale set to it
INFO: Looking for translation file for 'it' under /usr/share/conkyforecast/locale
... some lines skipped ...
INFO: Not using a proxy as none is defined
INFO: Fetching weather data from http://xml.weather.com/weather/local/<your location ID>?cc=*&dayf=5&link=xoap&prod=xoap&key=<your weather ID>
INFO: Saving updated cache file /tmp/.conkyForecast-<your location ID>.cache
13 °C


Portage 2.2.8-r1 (default/linux/amd64/13.0/desktop/kde, gcc-4.7.3, glibc-2.17, 3.12.13-gentoo x86_64)
=================================================================
System uname: Linux-3.12.13-gentoo-x86_64-Pentium-R-_Dual-Core_CPU_E5400_@_2.70GHz-with-gentoo-2.2
KiB Mem:     3047816 total,     96160 free
KiB Swap:    2096444 total,   2075244 free
Timestamp of tree: Wed, 19 Mar 2014 00:45:01 +0000
ld ld di GNU (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5-r3, 3.2.5-r3, 3.3.3
dev-util/cmake:           2.8.11.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.5.4, 4.6.3, 4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CPPFLAGS="-march=native -O2 -pipe"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://de-mirror.org/gentoo/ http://gentoo.fh-luh.de/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://ftp.halifax.rwth-aachen.de/gentoo/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://mirror.iawnet.sandia.gov/gentoo/ http://www.gtlib.gatech.edu/pub/gentoo/ http://lug.mtu.edu/gentoo/ http://gentoo.wheel.sk/ http://mirrors.linuxant.fr/distfiles.gentoo.org/ http://gentoo.modulix.net/gentoo/ http://gentoo.lagis.at/ http://mirror.leaseweb.com/gentoo/ http://gentoo.mneisen.org/ http://mirror.switch.ch/ftp/mirror/gentoo/"
LANG="it_IT.UTF-8"
LC_ALL="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/home/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 apache2 apache2_modules bash-completion berkdb bluetooth bonjour branding bzip2 cairo cdda cddb cdr cli clucene consolekit corefonts cracklib crypt cups cxx dbus declarative dri dts dvd dvdr dvdread emboss encode exif fam ffmpeg firefox flac fortran freetds fts3 gdbm gif gnutls gpm gtk iconv id3tag ipod ipv6 java jpeg kde kerberos kipi lame lcms ldap libnotify live lm_sensors mad mmx mmxext mng modules mozilla mp3 mp4 mpeg mpi msn multilib mysql ncurses nls nptl nsplugin odbc ogg opengl openmp oscar pam pango pcre pcsc-lite pdf phonon pkcs11 plasma png policykit polkit-kde-agent ppds private-headers python3 qemu qscintilla qt3support qt4 quicktime quota readline real ruby samba schroedinger sdl semantic-desktop sensord session smartcard spell spice sqlite sse sse2 sse3 ssl ssse3 startup-notification svg swat symlink syslog tcpd test theora threads tiff tk truetype udev udisks unicode upower usb vim-syntax virt-network virtfs virtuoso vorbis webgl webkit winbind wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xulrunner xv xvfb xvid yahoo zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="it" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" RUBY_TARGETS="ruby19 ruby20 ruby21 rbx" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.4"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Michele Testa 2014-03-19 09:22:34 UTC
Created attachment 373006 [details, diff]
A simple patch to solve this issue

With this quick and dirty patch I solved the issue on my gentoo box. I collect only the first and the last item of the location node provided by weather.com, ignoring additional data that raise the exception.
Python isn't my native language, so sorry for the poor style :)
Comment 2 Behzat 2014-12-04 19:52:28 UTC
(In reply to Michele Testa from comment #1)
> Created attachment 373006 [details, diff] [details, diff]
> A simple patch to solve this issue
> 
> With this quick and dirty patch I solved the issue on my gentoo box. I
> collect only the first and the last item of the location node provided by
> weather.com, ignoring additional data that raise the exception.
> Python isn't my native language, so sorry for the poor style :)

This patch works fine, please add this patch package

cheers,
-behzat
Comment 3 Michele Testa 2014-12-04 20:11:38 UTC
(In reply to Behzat from comment #2)
> (In reply to Michele Testa from comment #1)
> > Created attachment 373006 [details, diff] [details, diff] [details, diff]
> > A simple patch to solve this issue
> > 
> > With this quick and dirty patch I solved the issue on my gentoo box. I
> > collect only the first and the last item of the location node provided by
> > weather.com, ignoring additional data that raise the exception.
> > Python isn't my native language, so sorry for the poor style :)
> 
> This patch works fine, please add this patch package
> 
> cheers,
> -behzat

Thanks for your endorsement, behzat
Have a nice day,

Michele
Comment 4 Myckel Habets 2014-12-04 21:16:23 UTC
Arch testing teams don't belong here.
Comment 5 Michele Testa 2014-12-19 09:45:49 UTC
Same error appears also with the version 2.24-r1

My proposed patch (see comment 1) works with this release too  :)