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

dspy.Image's object's __repr__ cannot handle URL begins with http(s) #1902

Open
DigitalPig opened this issue Dec 8, 2024 · 0 comments
Open

Comments

@DigitalPig
Copy link

A minimal example:

Python 3.12.8 (main, Dec  3 2024, 18:42:41) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dspy
>>> test_image = dspy.Image.from_url("https://example.com/example.png")
>>> test_image
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/digitalpig/Codes/dspy/dspy/adapters/image_utils.py", line 52, in __repr__
    len_base64 = len(self.url.split("base64,")[1])
                     ~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
>>> 
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