Ask coding questions

← Back to all posts
Displaying an Image...
EricBromstead

So this is what I have been trying...
https://repl.it/@EricBromstead/DearVigilantSandbox
Just as a test I used Garfield
But I get an Error:
Traceback (most recent call last):
File "python", line 2, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'DarGarf.png'

Voters
Harshitupadhya2
JohnHunt3
Ariel102
babi752
fatima31
SaRiAhh
AalindTyagi1
BLyons
jccacho
EricBromstead
Comments
hotnewtop
EverettErlandso

this is stupid

pyelias

It's a typo: /DaGarf.png vs DarGarf.png (make sure to remove the /).
Also, I don't think repl.it support displaying images in the console.

EricBromstead

@pyelias Oh so images? Darn. Welp whatever thank anyway :)

EricBromstead

OK I fix it so I dont get an error now but i get this printed instead:
<IPython.core.display.Image object>

JoshDaBosh

@EricBromstead i don't believe repl.it supports displaying images, as pyelias also said.

JoshDaBosh

Your filename is DaGarf.png not DarGarf.png

https://repl.it/@JoshDaBosh/DearVigilantSandbox