Skip to content

openpyxl compatibility warning doesn't catch no openpyxl installed #7642

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

Closed
patricktokeeffe opened this issue Jul 2, 2014 · 2 comments
Closed

Comments

@patricktokeeffe
Copy link
Contributor

Just installed 0.14.0 (on Windows 7) and received this warning:

Installed openpyxl is not supported at this time. Use >=1.6.1 and <2.0.0.

I did not have any version of openpyxl installed though. Perhaps the change made to pandas/io/excel.py in #7214 should have been more like:

-register_writer(_OpenpyxlWriter)
+
+openpyxl_check = openpyxl_compat.is_compat()
+if openpyxl_check is None:
+    warn('Could not import openpyxl -- not using.')
+elif openpyxl_check:
+    register_writer(_OpenpyxlWriter)
+else:
+    warn('Installed openpyxl is not supported at this time. Use >={} and <{}.'
+            .format(openpyxl_compat.start_ver, openpyxl_compat.stop_ver))

As a side note, I received the same warning after installing openpyxl 1.9.0 but it was because I didn't have lxml (<-- I may have misspelled this module name).

@jreback
Copy link
Contributor

jreback commented Jul 2, 2014

see here: #7284

ready fixed in master/0.14.1

thanks for. the report

@jreback jreback closed this as completed Jul 2, 2014
@dhomeier
Copy link

=1.6.1 and <2.0.0 does not really work, does it?
At least _OpenpyxlWriter._convert_to_style has its problems because
openpyxl.style changed its name to openpyxl.styles by 1.8, and in 1.9.0 on top of this the
Style.borders method has morphed to Style.border and its __setattr__ also seems to work differently.
Bottom line is, with
from openpyxl.styles import Style
the excel-related tests seem to succeed with 1.8.6, yet not with 1.9.0.

neirbowj referenced this issue Jul 21, 2014
*   Detect whether a compatible version is installed
*   Skip openpyxl unit tests instead of failing
*   Inhibit registration of `openpyxl` engine in `ExcelWriter`
*   Raise `UserWarning`
*   Document limitation as a known issue
*   Resolve issue #7169
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

3 participants