-
Notifications
You must be signed in to change notification settings - Fork 624
Textract-py3 #543
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
base: master
Are you sure you want to change the base?
Textract-py3 #543
Conversation
Clarification, _getStringStream *should* return `unicode` in Python 2, `str` in Python 3, IF the stream requested exists. If it does not exist, it returns `None`, which cannot be added to bytes. This commit adds a check for None, returning an empty bytes string if matched.
There are small typos in: - docs/installation.rst - textract/exceptions.py Fixes: - Should read `suppressed` rather than `supressed`. - Should read `documentation` rather than `documenation`. - Should read `accommodated` rather than `accomodated`. Signed-off-by: Tim Gates <[email protected]>
As of now, the txt parser reads files in text mode as UTF-8 and fails with other encodings. This makes it return a bytes object, leaving the base `decode` to figure out the encoding and act accordingly.
docs: sync latest upstream changes
@KyleKing and chance you could update the deps on your fork please and release a new version. It's pinned to using a older version of msg-extractor which had a pinned dep that broke when BS4 was updated, they've patched their part now, please see Great work on the fork though keep it going please! |
Of course! I’m glad that you’re finding it to be useful and I’m happy to accept PRs. I’m out of town now, but I’ll release no later than the 24th! |
My fork doesn't have any upper bound constraints on dependencies (https://github.com/KyleKing/textract-py3/blob/f3f509f8c36be05c85574ac841632693c2a19bd9/pyproject.toml#L22), so any project with For |
Hey @KyleKing thanks for creating the fork and maintaing that for the moment. I tried using it but my colleague pointed out that the reason one of our tests started to break was because textract-py3 was installing xlrd 2.1.0. xlrd 2 and upwards removed support for anything but .xls so textract would no longer support xlsx. I fixed it by explicitly requiring When you get the chance you may want to restrict xlrd in the toml to |
Thanks @anthonyhashemi! You're right and I'll publish a release this afternoon Long-term, maybe adapting changes to use |
Prevents upgrading xlrd
I've released v2.1.1 with the patch. Thanks again! |
Moving over to use openpyxl for xlsx would be good as then the constraint on xlrd could be removed which would be useful for projects that also use pandas for XLS as that, pandas, now requires v2.0.1+ of xlrd when using the xlrd engine |
That would be great and I would be open to PRs! I don’t have a use case for Excel, so I wouldn’t make the changes otherwise |
Hi! FWIW I have been maintaining a very minimal published fork of
textract
to address the blocking issue with*
dependencies. This PR is to track the differences if anyone wants to usetextract-py3
while the long term maintenance oftextract
is resolved (#498). Oncetextract
is released with a patch for #461, I will redirect users away from my fork because hopefully the upstream package will resume merging PRs, patching, and new version releases, but I unfortunately won't have the bandwidth to contribute beyond this fork.