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

With pip langfun[all] installed, still ask for installing "Please install "langfun[mime-auto]" to enable automatic MIME support." #364

Open
Amyssjj opened this issue Dec 11, 2024 · 0 comments

Comments

@Amyssjj
Copy link
Contributor

Amyssjj commented Dec 11, 2024

File ~/Documents/Jing_Agent/agent_venv/lib/python3.10/site-packages/langfun/core/modalities/mime.py:50, in Mime.mime_type(self)
47 @functools.cached_property
48 def mime_type(self) -> str:
49 """Returns the MIME type."""
---> 50 mime = from_buffer((self.to_bytes()), mime=True)
51 if (
52 self.MIME_PREFIX
53 and not mime.lower().startswith(self.MIME_PREFIX)
(...)
56 and mime != 'application/octet-stream'
57 ):
58 raise ValueError(
59 f'Expected MIME type: {self.MIME_PREFIX}, Encountered: {mime}'
60 )

File ~/Documents/Jing_Agent/agent_venv/lib/python3.10/site-packages/langfun/core/modalities/mime.py:29, in from_buffer(*unused_args, **unused_kwargs)
28 def from_buffer(*unused_args, **unused_kwargs):
---> 29 raise RuntimeError(
30 'Please install "langfun[mime-auto]" to enable automatic MIME support.'
31 )

RuntimeError: Please install "langfun[mime-auto]" to enable automatic MIME support.
PDF(uri=None, content=b'%PDF-1.4\n%\xd3\xeb\xe9\xe1\n1 0 obj\n<</Title (langfun101)\n/Creator (Moz

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