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

strip added to excel extractor breaks extraction () #42

Closed
aleksandra-kim opened this issue Oct 5, 2017 · 1 comment
Closed

strip added to excel extractor breaks extraction () #42

aleksandra-kim opened this issue Oct 5, 2017 · 1 comment
Labels
bug Something isn't working major

Comments

@aleksandra-kim
Copy link
Member

Original report by Pascal Lesage (Bitbucket: MPa, ).


Strip added to extractor in commit 3390d0f results in AttributeError when importing Excel:

c:\mypy\code\brightway2-io\bw2io\extractors\excel.py in <lambda>(x)
     17     def extract_sheet(cls, wb, name, strip=True):
     18         ws = wb.sheet_by_name(name)
---> 19         _ = lambda x: x.strip() if strip else x
     20         return [[_(ws.cell(row, col).value) for col in range(ws.ncols)] for row in range(ws.nrows)]
     21 
AttributeError: 'float' object has no attribute 'strip'

Tested on file "sample_activities_with_variables.xlsx"

@aleksandra-kim
Copy link
Member Author

Original comment by Chris Mutel (Bitbucket: cmutel, GitHub: cmutel).


0.5.12. Fixes #42

@aleksandra-kim aleksandra-kim added major bug Something isn't working labels Mar 10, 2020
cmutel added a commit that referenced this issue Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

1 participant