Python Forum
code to retrieve an image gave me an error
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
code to retrieve an image gave me an error
#1
Code:
from graphics import *
win = GraphWin("Hydro Jar", 1000, 1000)
img = Image(Point(0, 0), "C:\\Users\\M Williams\\Downloads\\robotfree.zip\\png\\Idle (1).png")
Error:
return self.img.width() AttributeError: 'Image' object has no attribute 'img'
Reply
#2
Is that module capable of extracting images from compressed archives?
Just to be safe, try extracting the zip file, and change the path to match the extracted file.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020