zim rendering notebook as blank. Exporting results in: UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte

Bug #960514 reported by Tanath
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zim (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Zim started showing my default notebook as all blank pages, so I tried reloading and then exporting, and got this:

Looks like you found a bug
UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte
When reporting this bug please include the information from the text box below

This is zim 0.52
Python version is sys.version_info(major=2, minor=7, micro=2, releaselevel='final', serial=0)
Gtk version is (2, 24, 6)
Pygtk version is (2, 24, 0)
Platform is posix
Zim revision is:
  branch: pyzim-trunk
  revision: 391 <email address hidden>
  date: 2011-04-28 20:09:07 +0200

======= Traceback =======
  File "/usr/lib/pymodules/python2.7/zim/gui/widgets.py", line 1912, in do_response
    destroy = self.do_response_ok()
  File "/usr/lib/pymodules/python2.7/zim/gui/exportdialog.py", line 64, in do_response_ok
    exporter.export_all(dir, callback=lambda p: dialog.pulse(p.name))
  File "/usr/lib/pymodules/python2.7/zim/exporter.py", line 88, in export_all
    self.export_page(dir, current, pages, use_namespace=True)
  File "/usr/lib/pymodules/python2.7/zim/exporter.py", line 152, in export_page
    self.export_page_to_fh(fh, page, pages)
  File "/usr/lib/pymodules/python2.7/zim/exporter.py", line 173, in export_page_to_fh
    lines = self.template.process(self.notebook, page, pages)
  File "/usr/lib/pymodules/python2.7/zim/templates.py", line 347, in process
    output = GenericTemplate.process(self, dict)
  File "/usr/lib/pymodules/python2.7/zim/templates.py", line 203, in process
    output = TextBuffer(self.tokens.process(dict))
  File "/usr/lib/pymodules/python2.7/zim/templates.py", line 386, in process
    output.extend(token.process(dict))
  File "/usr/lib/pymodules/python2.7/zim/templates.py", line 489, in process
    return block.process(dict)
  File "/usr/lib/pymodules/python2.7/zim/templates.py", line 386, in process
    output.extend(token.process(dict))
  File "/usr/lib/pymodules/python2.7/zim/templates.py", line 439, in process
    value = self.expr.evaluate(dict)
  File "/usr/lib/pymodules/python2.7/zim/templates.py", line 568, in evaluate
    return dict[self]
  File "/usr/lib/pymodules/python2.7/zim/templates.py", line 688, in __getitem__
    item = self._lookup_key(self._default, param)
  File "/usr/lib/pymodules/python2.7/zim/templates.py", line 679, in _lookup_key
    return getattr(branch, param.key)
  File "/usr/lib/pymodules/python2.7/zim/templates.py", line 732, in heading
    def heading(self): return self._treeproxy().heading
  File "/usr/lib/pymodules/python2.7/zim/templates.py", line 713, in _treeproxy
    ParseTreeProxy(self._page.get_parsetree(), self)
  File "/usr/lib/pymodules/python2.7/zim/notebook.py", line 1856, in get_parsetree
    self._parsetree = self._fetch_parsetree()
  File "/usr/lib/pymodules/python2.7/zim/stores/files.py", line 210, in _fetch_parsetree
    lines = lines or self.source.readlines()
  File "/usr/lib/pymodules/python2.7/zim/fs.py", line 1015, in readlines
    lines = self._readlines()
  File "/usr/lib/pymodules/python2.7/zim/fs.py", line 1033, in _readlines
    lines = file.readlines()
  File "/usr/lib/python2.7/codecs.py", line 679, in readlines
    return self.reader.readlines(sizehint)
  File "/usr/lib/python2.7/codecs.py", line 588, in readlines
    data = self.read()
  File "/usr/lib/python2.7/codecs.py", line 477, in read
    newchars, decodedbytes = self.decode(data, self.errors)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: zim 0.52-1
ProcVersionSignature: Ubuntu 3.0.0-17.30-generic 3.0.22
Uname: Linux 3.0.0-17-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Tue Mar 20 14:57:41 2012
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007.1)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 SHELL=/usr/bin/zsh
SourcePackage: zim
UpgradeStatus: Upgraded to oneiric on 2012-03-14 (6 days ago)

Revision history for this message
Tanath (tanath) wrote :
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 960514] Re: zim rendering notebook as blank. Exporting results in: UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte

Looks like you have some content in the notebook that is not UTF-8
encoded, but in a different encoding. Can you check the content ?

-- Jaap

Revision history for this message
Tanath (tanath) wrote :

I had difficulty troubleshooting until I realized zim had to be restarted
before it looked at the files again, and telling it to reload apparently
doesn't do what I thought it did.

I got the files converted back and all is well in zim again. I think it was
caused by editing the files on my Android. Or possibly my laptop. (I store
my notebooks in Dropbox.)
On Mar 20, 2012 5:36 PM, "Jaap Karssenberg" <email address hidden>
wrote:

> Looks like you have some content in the notebook that is not UTF-8
> encoded, but in a different encoding. Can you check the content ?
>
> -- Jaap
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/960514
>
> Title:
> zim rendering notebook as blank. Exporting results in:
> UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0:
> invalid start byte
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/zim/+bug/960514/+subscriptions
>

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Error handling for this type of error has been improved already in zim 0.53, it gives an error dialog that explains the issue and des not block the whole notebook.

So flagging this bug as invalid.

-- Jaap

Changed in zim (Ubuntu):
status: New → Invalid
Revision history for this message
Tanath (tanath) wrote :

Then shouldn't this be market as fix released?
On Mar 24, 2012 7:00 AM, "Jaap Karssenberg" <email address hidden>
wrote:

> Error handling for this type of error has been improved already in zim
> 0.53, it gives an error dialog that explains the issue and des not block
> the whole notebook.
>
> So flagging this bug as invalid.
>
> -- Jaap
>
> ** Changed in: zim (Ubuntu)
> Status: New => Invalid
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/960514
>
> Title:
> zim rendering notebook as blank. Exporting results in:
> UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0:
> invalid start byte
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/zim/+bug/960514/+subscriptions
>

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

On Mon, Apr 2, 2012 at 7:22 PM, Tanath <email address hidden> wrote:
> Then shouldn't this be market as fix released?

Technically I should find the original bug and flag this one as
duplicate, but I guess people ending up here will see the comment with
the fix, so status doesn't matter that much.

-- Jaap

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.