Skip to content
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

decimal.Decimal not included in DataTypes._numberTypes #22

Closed
rhyek opened this issue Apr 29, 2014 · 2 comments
Closed

decimal.Decimal not included in DataTypes._numberTypes #22

rhyek opened this issue Apr 29, 2014 · 2 comments
Assignees

Comments

@rhyek
Copy link

rhyek commented Apr 29, 2014

In version 0.5.0 I'm getting KeyError exceptions in Worksheet.py on line 143 for any cell with a decimal.Decimal value.

I tracked the error back to line 21 of DataTypes.py. Because Decimal values aren't being identified as DataTypes.NUMBER or any other type, they are never added to cell_cache. Thus the exceptions.

Importing the decimal module and changing line 21 of DataTypes.py to

_numberTypes = six.integer_types + (float, complex, decimal.Decimal)

fixes the problem.

@kz26
Copy link
Owner

kz26 commented Apr 29, 2014

Noted and thanks for the patch! Will be fixed for next release.

@kz26 kz26 self-assigned this Apr 29, 2014
@kz26
Copy link
Owner

kz26 commented May 10, 2014

Fixed in 0.6.0 released today - also added a test for this.

@kz26 kz26 closed this as completed May 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants