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

Update openpyxl dependency #44

Open
evaneill opened this issue Mar 28, 2024 · 0 comments
Open

Update openpyxl dependency #44

evaneill opened this issue Mar 28, 2024 · 0 comments

Comments

@evaneill
Copy link
Collaborator

The current setup.py fixes the openpyxl dependency at 3.0.9 because later versions break one very specific segment of code in adapter.to_python here.

I think this could be fixed with:

if hasattr(self.wb.defined_names,"definedName"):
  # This case is for openpyxl <3.1.0
  all_input_ranges = {object_range.name for object_range in self.wb.defined_names.definedName}
else:
  # This case is for openpyxl ≥3.1.0
  all_input_ranges = set(self.wb.defined_names.keys())

This change was capable of getting around the error in my local environment and working, but it should be tried and ran through the adapter tests. If all seems good, then I'd advise just getting rid of the version requirement on openpyxl

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

1 participant