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

Add support for Flat XML OpenDocumentFormat files #22

Open
jonadem opened this issue Jul 25, 2017 · 2 comments
Open

Add support for Flat XML OpenDocumentFormat files #22

jonadem opened this issue Jul 25, 2017 · 2 comments

Comments

@jonadem
Copy link

jonadem commented Jul 25, 2017

When I try to open a .odt file, I get:

>>> textproc = ezodf.opendoc("foo.fodt")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/ezodf/document.py", line 54, in opendoc
    mime_type = __detect_mime_type(fm)
  File "/usr/local/lib/python2.7/dist-packages/ezodf/document.py", line 69, in __detect_mime_type
    mime_type = MIMETYPES[ext]
KeyError: '.fodt'

Same for .ods files

@jonadem
Copy link
Author

jonadem commented Jul 26, 2017

I think commit c96fe52 introduced the issue.
Before it checks first if provided file is a zip; after it checks first if filename is not None (and don't reach the flat xml test).

@jonadem
Copy link
Author

jonadem commented Nov 13, 2018

PR #23 solve the issue.

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