[Bug 444070] Re: share.py crashed with UnicodeDecodeError in <module>()

Didier Roche didrocks at gmail.com
Tue Oct 6 11:47:57 UTC 2009


Ok, found it (found some free time to debug).

So, the answer is indeed in this line:
print _("%s %s is building on Launchpad. Wait for half an hour and have look at %s.") % (project_name, version, ppa_url)

ppa_url was in unicode (launchpad gives back this elements in unicode).
print() can transtype unicode in str, but not gettext!

So, when you are using a translation which is localized, gettext try to encode ppa_url, which fails :)
The patch is simply:
print _("%s %s is building on Launchpad. Wait for half an hour and have look at %s.") % (project_name, version, ppa_url.encode('UTF-8'))

I am eager of having python3 pushed by default :)
Fixed in trunk, and a new release this fix will be present before karmic one.

-- 
share.py crashed with UnicodeDecodeError in <module>()
https://bugs.launchpad.net/bugs/444070
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list