Zim

Could not save page page: Expected string or buffer

Bug #1693902 reported by Robert Collins
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Zim
Expired
Undecided
Unassigned

Bug Description

To reproduce:

1. Create a table; mine has 5 columns.
2. Edit another page.
3. Return to the page with the table. Select the tools icon in the table toolbar.
4. Insert a new column between two existing columns. "OK"
5. The new column will not be created.

When Zim tries to save the page, the error will occur.

- If you select "Discard changes" you can keep working.
- If you select "Save changes" the attempt to save a copy will fail and generate a bug report prompt.

Output:

This is zim 0.65
Platform: posix
Locale: en_US UTF-8
FS encoding: UTF-8
Python: (2, 7, 12, 'final', 0)
Gtk: (2, 24, 30)
Pygtk: (2, 24, 0)
Zim revision is:
  branch: zim-trunk
  revision: 805 <email address hidden>
  date: 2015-11-01 15:42:45 +0100

======= Traceback =======
  File "/usr/lib/python2.7/dist-packages/zim/gui/widgets.py", line 3106, in do_response
    destroy = self.do_response_ok()
  File "/usr/lib/python2.7/dist-packages/zim/gui/__init__.py", line 3283, in do_response_ok
    lines = self.page.dump(format)
  File "/usr/lib/python2.7/dist-packages/zim/notebook.py", line 2507, in dump
    tree = self.get_parsetree()
  File "/usr/lib/python2.7/dist-packages/zim/notebook.py", line 2414, in get_parsetree
    return self._ui_object.get_parsetree()
  File "/usr/lib/python2.7/dist-packages/zim/gui/pageview.py", line 5067, in get_parsetree
    self._parsetree = buffer.get_parsetree()
  File "/usr/lib/python2.7/dist-packages/zim/gui/pageview.py", line 2387, in get_parsetree
    obj.build_parsetree_of_table(builder, iter)
  File "/usr/lib/python2.7/dist-packages/zim/plugins/tableeditor.py", line 421, in build_parsetree_of_table
    headers, rows, attrib = self.get_data()
  File "/usr/lib/python2.7/dist-packages/zim/plugins/tableeditor.py", line 353, in get_data
    treerow
  File "/usr/lib/python2.7/dist-packages/zim/plugins/tableeditor.py", line 352, in <lambda>
    lambda cell: CellFormatReplacer.cell_to_input(cell, True),
  File "/usr/lib/python2.7/dist-packages/zim/plugins/tableeditor.py", line 172, in cell_to_input
    text = pattern[1].sub(replace[2], text)
TypeError: expected string or buffer

(END)

Running `zim -D` produced output ending in a message that the result would probably not be useful in bug reports.

Tags: tables
summary: - Could save page page: Expected string or buffer
+ Could not save page page: Expected string or buffer
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Please verify same issue still present in 0.66 / 0.67 or not

Changed in zim:
status: New → Incomplete
Revision history for this message
Robert Collins (muscogulus) wrote : Re: [Bug 1693902] Re: Could not save page page: Expected string or buffer
Download full text (3.1 KiB)

Did the update and tested. No errors! Looks good!

--
  Robert P. Collins
  <email address hidden>

On Wed, May 31, 2017, at 08:11 AM, Jaap Karssenberg wrote:
> Please verify same issue still present in 0.66 / 0.67 or not
>
> ** Changed in: zim
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1693902
>
> Title:
> Could not save page page: Expected string or buffer
>
> Status in Zim:
> Incomplete
>
> Bug description:
> To reproduce:
>
> 1. Create a table; mine has 5 columns.
> 2. Edit another page.
> 3. Return to the page with the table. Select the tools icon in the
> table toolbar.
> 4. Insert a new column between two existing columns. "OK"
> 5. The new column will not be created.
>
> When Zim tries to save the page, the error will occur.
>
> - If you select "Discard changes" you can keep working.
> - If you select "Save changes" the attempt to save a copy will fail and
> generate a bug report prompt.
>
> Output:
>
> This is zim 0.65
> Platform: posix
> Locale: en_US UTF-8
> FS encoding: UTF-8
> Python: (2, 7, 12, 'final', 0)
> Gtk: (2, 24, 30)
> Pygtk: (2, 24, 0)
> Zim revision is:
> branch: zim-trunk
> revision: 805
> <email address hidden>
> date: 2015-11-01 15:42:45 +0100
>
> ======= Traceback =======
> File "/usr/lib/python2.7/dist-packages/zim/gui/widgets.py", line
> 3106, in do_response
> destroy = self.do_response_ok()
> File "/usr/lib/python2.7/dist-packages/zim/gui/__init__.py", line
> 3283, in do_response_ok
> lines = self.page.dump(format)
> File "/usr/lib/python2.7/dist-packages/zim/notebook.py", line 2507,
> in dump
> tree = self.get_parsetree()
> File "/usr/lib/python2.7/dist-packages/zim/notebook.py", line 2414,
> in get_parsetree
> return self._ui_object.get_parsetree()
> File "/usr/lib/python2.7/dist-packages/zim/gui/pageview.py", line
> 5067, in get_parsetree
> self._parsetree = buffer.get_parsetree()
> File "/usr/lib/python2.7/dist-packages/zim/gui/pageview.py", line
> 2387, in get_parsetree
> obj.build_parsetree_of_table(builder, iter)
> File "/usr/lib/python2.7/dist-packages/zim/plugins/tableeditor.py",
> line 421, in build_parsetree_of_table
> headers, rows, attrib = self.get_data()
> File "/usr/lib/python2.7/dist-packages/zim/plugins/tableeditor.py",
> line 353, in get_data
> treerow
> File "/usr/lib/python2.7/dist-packages/zim/plugins/tableeditor.py",
> line 352, in <lambda>
> lambda cell: CellFormatReplacer.cell_to_input(cell, True),
> File "/usr/lib/python2.7/dist-packages/zim/plugins/tableeditor.py",
> line 172, in cell_to_input
> text = pattern[1].sub(replace[2], text)
> TypeError: expected string or buffer
>
> (END)
>
> Running `zim -D` produced output ending in a message that the result
> would probably not be useful in bug reports.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/zim/+bug/1693902/+subscription...

Read more...

Revision history for this message
Laecy (laecy) wrote :

My bug was very similar. I didn't navigate away from the page, and I was trying to split one column into two, but otherwise it was exactly the same sequence of events.

In case you could use the bug report:

This is zim 0.65
Platform: nt
Locale: en_US cp1252
FS encoding: mbcs
Python: (2, 7, 11, 'final', 0)
Gtk: (2, 24, 10)
Pygtk: (2, 24, 0)
Zim revision is:
  branch: 065
  revision: 805 <email address hidden>
  date: 2015-11-01 15:42:45 +0100

======= Traceback =======
  File "zim\gui\widgets.pyo", line 3106, in do_response
  File "zim\gui\__init__.pyo", line 3282, in do_response_ok
  File "zim\notebook.pyo", line 2507, in dump
  File "zim\notebook.pyo", line 2414, in get_parsetree
  File "zim\gui\pageview.pyo", line 5067, in get_parsetree
  File "zim\gui\pageview.pyo", line 2387, in get_parsetree
  File "zim\plugins\tableeditor.pyo", line 421, in build_parsetree_of_table
  File "zim\plugins\tableeditor.pyo", line 353, in get_data
  File "zim\plugins\tableeditor.pyo", line 352, in <lambda>
  File "zim\plugins\tableeditor.pyo", line 172, in cell_to_input
TypeError: expected string or buffer

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Zim because there has been no activity for 60 days.]

Changed in zim:
status: Incomplete → Expired
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.