Skip to content

Commit 75266b7

Browse files
committed
fix the problem when official ezodf is installed
1 parent 946d930 commit 75266b7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pyexcel_ods3/odsbook.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,13 @@ class ODSBook:
9090

9191
def __init__(self, filename, file_content=None, **keywords):
9292
"""Load the file"""
93-
self.doc = ezodf.opendoc(filename, file_content)
93+
import pkg_resources
94+
if pkg_resources.require("ezodf")[0].version == "0.2.5-chfw":
95+
self.doc = ezodf.opendoc(filename, file_content)
96+
else:
97+
if file_content:
98+
raise NotImplementedError("Please use custom version of ezodf")
99+
self.doc = ezodf.opendoc(filename)
94100
self.SHEETS = OrderedDict()
95101
self.sheet_names = []
96102
for sheet in self.doc.sheets:

0 commit comments

Comments
 (0)