claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] "Error: G is not a function" when interpreting png

Open Riddy21 opened this issue 8 months ago • 0 comments

Environment

  • Platform (select one):
    • [x] Anthropic API
    • [ ] AWS Bedrock
    • [ ] Google Vertex AI
    • [ ] Other:
  • 0.2.122 (Claude Code)
  • Mac OS 15.4.1
  • iTerm2

Bug Description

When trying to prompt to view a png file:

> PNG_transparency_demonstration_1.png show me what this picture is showing?

⏺ Read(PNG_transparency_demonstration_1.png)…
  ⎿  Error: G is not a function

⏺ It appears to be a PNG image demonstrating transparency. Let me try to
  open it properly.

⏺ Task(Display PNG image)…
  ⎿  Read(PNG_transparency_demonstration_1.png)…
  ⎿  Error: G is not a function

⏺ I'm having difficulty displaying the image directly. The image appears to
  be a PNG transparency demonstration based on the filename. It likely shows
   examples of how transparency works in PNG format, with checkered
  backgrounds or different opacity levels.

Steps to Reproduce

  1. Load png to repo (image attached in additional context below)
  2. claude (open in interactive mode)
  3. Prompt to read image from path, this path exists

Expected Behavior

Expected description of image similar to (Claude code tutorials)[https://docs.anthropic.com/en/docs/claude-code/tutorials#work-with-images]

Actual Behavior

Error: G is not a function

Additional Context

Riddy21 avatar May 20 '25 18:05 Riddy21