This still exist in current trunk and I was hit by it today. Proposed patch will fix the error. I modified it a little bit and also added some code that will prevent \x00 characters being in the database in the first place.
** Patch added: "webkit_content_null_char.patch" https://bugs.launchpad.net/gwibber/+bug/647049/+attachment/2105617/+files/webkit_content_null_char.patch -- You received this bug notification because you are a member of Gwibber Bug Heros, which is subscribed to Gwibber. https://bugs.launchpad.net/bugs/647049 Title: gwui.py:260:render:TypeError: WebKitWebView.load_html_string() argument 1 must be string without null bytes, not str Status in Gwibber: New Bug description: Fedora has gotten a few bugs filed with the below traceback: gwui.py:260:render:TypeError: WebKitWebView.load_html_string() argument 1 must be string without null bytes, not str Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/gwibber/gwui.py", line 376, in on_stream_change self.update() File "/usr/lib/python2.6/site-packages/gwibber/gwui.py", line 391, in update self.messages.update(self.navigation.selected_stream) File "/usr/lib/python2.6/site-packages/gwibber/gwui.py", line 723, in update self.messages = self.message_view.render([selected_stream], count) File "/usr/lib/python2.6/site-packages/gwibber/gwui.py", line 781, in render accounts=accounts) File "/usr/lib/python2.6/site-packages/gwibber/gwui.py", line 260, in render self.load_html_string(content, "file://%s/" % os.path.dirname(template_path)) TypeError: WebKitWebView.load_html_string() argument 1 must be string without null bytes, not str Thanks to the help of Toshio Kuratomi, I was able to narrow this down to a simple test case: """CODE STARTS""" import os, webkit template_path = '/usr/share/gwibber/ui/themes/default/template.mako' content = 'foo \x00' web = webkit.WebView() web.load_html_string(content, "file://%s/" % os.path.dirname(template_path)) """CODE ENDS""" Somehow, in certain situations, \x00 ends up in the content string, and load_html_string chokes on it. Since content contains all of the processed messages which are trying to be displayed (but is used after this load_html_string() call), the safest bet seemed to be to simply replace it with a " " whenever it is found in content. This resolves the test case, and would seem to resolve the gwibber crashes as well. I've attached a patch which should stop these crashes from occurring. _______________________________________________ Mailing list: https://launchpad.net/~gwibber-bugs Post to : [email protected] Unsubscribe : https://launchpad.net/~gwibber-bugs More help : https://help.launchpad.net/ListHelp

