ClearWeatherScreenlet.py crashed with TypeError in show_error()

Bug #420747 reported by mama21mama
846
This bug affects 157 people
Affects Status Importance Assigned to Milestone
screenlets (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Binary package hint: screenlets

Traceback (most recent call last):
  File "/usr/share/screenlets/ClearWeather/ClearWeatherScreenlet.py", line 129, in update_weather_data
    temp = self.parseWeatherData()
  File "/usr/share/screenlets/ClearWeather/ClearWeatherScreenlet.py", line 170, in parseWeatherData
    self.show_error(("Error retrieving weather data", e))
  File "/usr/share/screenlets/ClearWeather/ClearWeatherScreenlet.py", line 565, in show_error
    reasonstr = "\nReason: %s" % reason if reason is not None else ""
TypeError: not all arguments converted during string formatting

ProblemType: Crash
Architecture: i386
Date: Fri Aug 28 00:16:23 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/share/screenlets/ClearWeather/ClearWeatherScreenlet.py
InterpreterPath: /usr/bin/python2.6
NonfreeKernelModules: nvidia
Package: screenlets 0.1.2-7
PackageArchitecture: all
ProcCmdline: python -u /usr/share/screenlets/ClearWeather/ClearWeatherScreenlet.py
ProcEnviron:
 LANG=es_AR.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/share/screenlets/ClearWeather/ClearWeatherScreenlet.py']
SourcePackage: screenlets
Title: ClearWeatherScreenlet.py crashed with TypeError in show_error()
Uname: Linux 2.6.30.4-010809 i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
mama21mama (mama21mama2000) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Thanks for taking the time to report this bug and helping to make Ubuntu better. We appreciate the difficulties you are facing, but this appears to be a "regular" (non-security) bug. I have unmarked it as a security issue since this bug does not show evidence of allowing attackers to cross privilege boundaries nor directly cause loss of data/privacy. Please feel free to report any other bugs you may find.

security vulnerability: yes → no
visibility: private → public
Revision history for this message
Mihai Glont (mihai-glont) wrote :

Hi, just a quick note to let you know that I'm running karmic 64bit and that the applet did *not* actually crash, I can still check the weather and everything... strange. I'm sure you'll sort it out. Cheers, --Mihai

Revision history for this message
James Jones (jamesjones01) wrote :

My situation appears to match Mihai's; despite the report, I can still change size, switch format, etc.

Revision history for this message
siggy (siggy) wrote :

Hi same as Mihai and James here!!!

Revision history for this message
IgyBoy (dr-igy) wrote :

Same here...

Revision history for this message
RvD_2002 (rv-d2002) wrote :

Hello, same as Jamie : just a crash report but all the weather widgets are still available.

Revision history for this message
mark_lawton73 (mark-lawton73) wrote :

Same here, weather still works even after the crash report.
This didnt occur until upgrading from 9.04 to 9.10
Thankyou

Revision history for this message
csoe (csorengineering) wrote :

I don't think the thing is really crashing, it only seems to occur when it can't get network access. Instead of waiting and trying again later, lack of network access is throwing an exception.

Changed in screenlets (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
description: updated
Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :
Changed in screenlets (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
hhlp (hhlp-deactivatedaccount) wrote :

Same here, weather still works even after the crash report.
This didnt occur until upgrading from 9.10 to 10.04
Thankyou

Revision history for this message
matjan (matty-janssen) wrote :

Since a few days I get the traceback as indicated in the bug description. However, when running the screenlet from the command line, it also says "Error retrieving weather data [Errno socket error] [Errno -2] Name or service not known". This does not make the screenlet crash, but it says "No weather information available".
Has weather.com maybe changed its XML feed format?

Revision history for this message
heynnema (heynnema) wrote :

I have the same problem, and I think it's because I'm on a wireless network, and the connection is not fully up yet when this screenlet tries to get its info from the Internet. Need to add a delay in the code.

Revision history for this message
Dario Orea (rdario-mx) wrote : Re: [Bug 420747] Re: ClearWeatherScreenlet.py crashed with TypeError in show_error()

with the updates i havent any problem, thanks any way

 Rubén Darío Orea
-----------------------------------
"Vive como si fueras a morir mañana;
Aprende como si fueras a vivir para siempre."
-Gandhi

________________________________
De: heynnema <email address hidden>
Para: <email address hidden>
Enviado: sábado, 16 de octubre, 2010 19:32:09
Asunto: [Bug 420747] Re: ClearWeatherScreenlet.py crashed with TypeError in
show_error()

I have the same problem, and I think it's because I'm on a wireless
network, and the connection is not fully up yet when this screenlet
tries to get its info from the Internet. Need to add a delay in the
code.

--
ClearWeatherScreenlet.py crashed with TypeError in show_error()
https://bugs.launchpad.net/bugs/420747
You received this bug notification because you are a direct subscriber
of a duplicate bug (631752).

Revision history for this message
Ferenc Gerlits (fgerlits) wrote :

This is still happening in 12.04. The problem is that the reason variable coming from an IOError is an (errno, strerror) tuple, so
  reasonstr = "\nReason: %s" % reason if reason is not None else ""
raises a TypeError. You could change this to
  reasonstr = "\nReason: %s" % str(reason)

For reason == None, this would result in "Reason: None", which I think is better than "".

For reason == (123, 'Some error'), it would result in "Reason: (123, 'Some error')" instead of crashing.

Of course, the IOError itself should be avoided by some delay, as well, as heynnema suggested, but this patch would at least avoid the crash.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "ClearWeatherScreenlet.py.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
To post a comment you must log in.