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

Encoding ignored #519

Open
mcp292 opened this issue Jul 29, 2024 · 0 comments
Open

Encoding ignored #519

mcp292 opened this issue Jul 29, 2024 · 0 comments

Comments

@mcp292
Copy link

mcp292 commented Jul 29, 2024

Describe the bug
The encoding argument seems to be ignored.

To Reproduce

  1. Save this image as file.png:
    file

  2. Run:

import textract


print(textract.process("file.png"), "\n")
print(textract.process("file.png", encoding="ascii"), "\n")
print(textract.process("file.png", encoding="nonexistent encoding"), "\n")

Expected behavior
I would expect the output of the above to differ. I would expect ascii to not be output as a byte string. I would expect nonexistent encoding to error or warn and ignore.

Desktop (please complete the following information):

  • OS: Fedora 40
  • Textract version: 1.6.5
  • Python version: 3.12.4
  • Virtual environment: no

Additional context
Haven't tested commandline.

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