New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph plotting broken from 0.3.9 #42

Closed
kstobbe opened this Issue Aug 27, 2013 · 8 comments

Comments

2 participants
@kstobbe

kstobbe commented Aug 27, 2013

It seems that graph plotting is not working in the 0.4.0 release. I have some code that worked fine on the 0.3.6 release but on the 0.4.0 release I get the following error:

line 308, in generate_excel_report
book.close()
File "/usr/local/lib/python2.7/dist-packages/xlsxwriter/workbook.py", line 231 >, in close
self._store_workbook()
File "/usr/local/lib/python2.7/dist-packages/xlsxwriter/workbook.py", line 380 , in _store_workbook
self._prepare_drawings()
File "/usr/local/lib/python2.7/dist-packages/xlsxwriter/workbook.py", line 746 , in _prepare_drawings
sheet._prepare_chart(index, chart_ref_id, drawing_id)
File "/usr/local/lib/python2.7/dist-packages/xlsxwriter/worksheet.py", line 36 22, in _prepare_chart
width, height)
File "/usr/local/lib/python2.7/dist-packages/xlsxwriter/worksheet.py", line 36 63, in _position_object_emus
width, height)
File "/usr/local/lib/python2.7/dist-packages/xlsxwriter/worksheet.py", line 37 35, in _position_object_pixels
x_abs += self._size_col(col_id)
File "/usr/local/lib/python2.7/dist-packages/xlsxwriter/worksheet.py", line 38 05, in _size_col
pixels = int(width * (max_digit_width + padding) + 0.5)
TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'

@jmcnamara

This comment has been minimized.

Show comment
Hide comment
@jmcnamara

jmcnamara Aug 27, 2013

Owner

Hi,

Thanks for the report.

Could you post a small working example that demonstrates the issue and I will have a look at it.

John

Owner

jmcnamara commented Aug 27, 2013

Hi,

Thanks for the report.

Could you post a small working example that demonstrates the issue and I will have a look at it.

John

@ghost ghost assigned jmcnamara Aug 27, 2013

@jmcnamara

This comment has been minimized.

Show comment
Hide comment
@jmcnamara

jmcnamara Aug 27, 2013

Owner

Also, It may be quicker to test if the code is also broken in 0.3.7 since there was a (potentially) backward incompatible change in that release.

Apart from that there is a change that went into 0.3.9 that may affect charts. However, all 160+ chart comparison testes are currently passing on 0.4.0 so my guess is that it may be related to the 0.3.7 change.

John

Owner

jmcnamara commented Aug 27, 2013

Also, It may be quicker to test if the code is also broken in 0.3.7 since there was a (potentially) backward incompatible change in that release.

Apart from that there is a change that went into 0.3.9 that may affect charts. However, all 160+ chart comparison testes are currently passing on 0.4.0 so my guess is that it may be related to the 0.3.7 change.

John

@kstobbe

This comment has been minimized.

Show comment
Hide comment
@kstobbe

kstobbe Aug 27, 2013

Hi John,

Thank you for your prompt feedback.

Unfortunately this comes from a larger body of code and it will take me some time to pull bits and pieces together for an example. Time which I don't have right now. I'll get back to you when I can. My current "work around" is to stay on version 0.3.6.

Cheers,
-Kristian

kstobbe commented Aug 27, 2013

Hi John,

Thank you for your prompt feedback.

Unfortunately this comes from a larger body of code and it will take me some time to pull bits and pieces together for an example. Time which I don't have right now. I'll get back to you when I can. My current "work around" is to stay on version 0.3.6.

Cheers,
-Kristian

@kstobbe

This comment has been minimized.

Show comment
Hide comment
@kstobbe

kstobbe Aug 27, 2013

Hi John,

Sorry, I was under the impression that 0.3.6 was the most recent version prior to 0.4.0.

The code works in 0.3.8 but not in 0.3.9. I hope this narrows the search space significantly for identifying this bug.

Cheers,
-Kristian

kstobbe commented Aug 27, 2013

Hi John,

Sorry, I was under the impression that 0.3.6 was the most recent version prior to 0.4.0.

The code works in 0.3.8 but not in 0.3.9. I hope this narrows the search space significantly for identifying this bug.

Cheers,
-Kristian

@jmcnamara

This comment has been minimized.

Show comment
Hide comment
@jmcnamara

jmcnamara Aug 27, 2013

Owner

The code works in 0.3.8 but not in 0.3.9. I hope this narrows the search space significantly for identifying this bug.

Hi Kristian,

That does help a bit.

Is there anything unusual about the charts you are generating: are they very small or very big, are you scaling them to fit into a certain number of cells, are you adjusting column widths to match the chart width? Anything that might be different than the standard examples or test cases?

Also, could you email me one of the working output files to jmcnamara@cpan.org. If there is anything confidential you can strip it out but try to leave the charts intact.

John

Owner

jmcnamara commented Aug 27, 2013

The code works in 0.3.8 but not in 0.3.9. I hope this narrows the search space significantly for identifying this bug.

Hi Kristian,

That does help a bit.

Is there anything unusual about the charts you are generating: are they very small or very big, are you scaling them to fit into a certain number of cells, are you adjusting column widths to match the chart width? Anything that might be different than the standard examples or test cases?

Also, could you email me one of the working output files to jmcnamara@cpan.org. If there is anything confidential you can strip it out but try to leave the charts intact.

John

@jmcnamara

This comment has been minimized.

Show comment
Hide comment
@jmcnamara

jmcnamara Aug 27, 2013

Owner

Hi Kristian,

I'm zeroing in on this a bit more. Can you check if you have any set_column() calls that may be setting the column width to None like either of these:

worksheet.set_column('A:A', None)  # Maybe a mistaken column format
# or
worksheet.set_column(0, 20)        # Need to set a max and min column and width

John

Owner

jmcnamara commented Aug 27, 2013

Hi Kristian,

I'm zeroing in on this a bit more. Can you check if you have any set_column() calls that may be setting the column width to None like either of these:

worksheet.set_column('A:A', None)  # Maybe a mistaken column format
# or
worksheet.set_column(0, 20)        # Need to set a max and min column and width

John

@jmcnamara jmcnamara closed this in 7ce1eb9 Aug 28, 2013

@jmcnamara

This comment has been minimized.

Show comment
Hide comment
@jmcnamara

jmcnamara Aug 28, 2013

Owner

Hi Kristian,

I think I found the issue. Check the new 0.4.1 version.

Tak!

John

Owner

jmcnamara commented Aug 28, 2013

Hi Kristian,

I think I found the issue. Check the new 0.4.1 version.

Tak!

John

@kstobbe

This comment has been minimized.

Show comment
Hide comment
@kstobbe

kstobbe Aug 28, 2013

Hi John,

My testing confirms that this issue is resolved in 0.4.1. Thank you very much for your swift response and excellent handling of the issue.

Cheers,
-Kristian

kstobbe commented Aug 28, 2013

Hi John,

My testing confirms that this issue is resolved in 0.4.1. Thank you very much for your swift response and excellent handling of the issue.

Cheers,
-Kristian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment