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

"There is no item named 'mimetype' in the archive" #8

Closed
linghu-chong opened this issue Feb 23, 2016 · 3 comments
Closed

"There is no item named 'mimetype' in the archive" #8

linghu-chong opened this issue Feb 23, 2016 · 3 comments

Comments

@linghu-chong
Copy link

raceback (most recent call last):
  File "parse_outcome.py", line 3, in <module>
    sheet = pe.get_book(file_name="***.ods")
  File "/Library/Python/2.7/site-packages/pyexcel/sources/__init__.py", line 235, in get_book
    book_stream = _get_book(**keywords)
  File "/Library/Python/2.7/site-packages/pyexcel/sources/__init__.py", line 199, in _get_book
    sheets, filename, path = source.get_data()
  File "/Library/Python/2.7/site-packages/pyexcel/sources/file.py", line 87, in get_data
    sheets = load_data(self.file_name, **self.keywords)
  File "/Library/Python/2.7/site-packages/pyexcel_io/__init__.py", line 166, in load_data
    **keywords)
  File "/Library/Python/2.7/site-packages/pyexcel_io/base.py", line 140, in __init__
    self.native_book = self.load_from_file(filename, **keywords)
  File "/Library/Python/2.7/site-packages/pyexcel_ods/__init__.py", line 234, in load_from_file
    return load(filename)
  File "/Library/Python/2.7/site-packages/odf/opendocument.py", line 610, in load
    mimetype = z.read('mimetype')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 935, in read
    return self.open(name, "r", pwd).read()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 961, in open
    zinfo = self.getinfo(name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 909, in getinfo
    'There is no item named %r in the archive' % name)
KeyError: "There is no item named 'mimetype' in the archive"
@chfw
Copy link
Member

chfw commented Feb 23, 2016

Look likes it is related to odfpy 0.9.6. But it is fixed in latest release 1.3.0. eea/odfpy#16 . However, to upgrade to odfpy 1.3.x , it requires additional work because odfpy 1.3.x does not like duct-typing, which breaks current pyexcel-ods.

@chfw
Copy link
Member

chfw commented May 20, 2016

Once my PR(eea/odfpy#32) is accepted into odfpy and released, this issue would go away.

@chfw
Copy link
Member

chfw commented Sep 19, 2016

latest odfpy is required as a dependency

@chfw chfw closed this as completed Sep 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants