Menu

#30 write_merge to one column and several rows

open-remind
None
5
2012-02-14
2011-07-26
T0ha
No

When you try to write_merge(row1,row2,col,col) you get an exception generated with "assert" in line 82 of Cell.py.
You need to change:
<code>assert col1 < col2, '%d < %d is false'%(col1, col2)</code>
to:
<code>assert col1 <= col2, '%d <= %d is false'%(col1, col2)</code>
on line 82 or download file from attach.

Discussion

  • T0ha

    T0ha - 2011-07-26
    • status: open --> open-fixed
     
  • T0ha

    T0ha - 2011-10-04

    <code>assert (col1+1) <= (col2+1), '%d <= %d is false'%(col1, col2)</code>
    It's better to fix 0 = False problem (first row)

     
  • Chris P. Ross

    Chris P. Ross - 2012-02-13
    • assigned_to: nobody --> cross
    • status: open-fixed --> pending-remind
     
  • Chris P. Ross

    Chris P. Ross - 2012-02-13

    I've fixed the problem in a different way, since a MulBlankCells record is silly for a single column. I just made it a BlankCell in that case.
    Can you explain what you mean by your comment below about "0 = False problem"?

     
  • Chris P. Ross

    Chris P. Ross - 2012-02-13

    Don't create a MulBlankCell for a single BlankCell

     
  • T0ha

    T0ha - 2012-02-14
    • status: pending-remind --> open-remind
     
  • T0ha

    T0ha - 2012-02-14

    When you try to write_merge(row1,row2,0,0) with first patch, you'll get an assertion error anyway, but the second patch fixes it.

     
  • Chris P. Ross

    Chris P. Ross - 2012-02-14

    Not for me. At least, when I try it in python 2.7 on Linux, your first solution solves the problem. Are you still able to produce the assertion exception with the code as you initially suggested? If so, let me know, because my solution (in Row, rather than in Cell) uses the same structure for an assertion.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.