Python Forum
Updating/running code when path changes
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updating/running code when path changes
#15
You didn't keep a reference to image, so it is garbage collected when the function exits. You can append to a list or create an instance object that survives, like canvas

    canvas.image = ImageTk.PhotoImage(pilImage)
    imagesprite = canvas.create_image(w / 2, h / 2, image=canvas.image) 
Reply


Messages In This Thread
RE: Updating/running code when path changes - by woooee - Aug-05-2022, 09:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  running the code and seeing the GUI chriswrcg 1 841 May-19-2023, 04:49 PM
Last Post: deanhystad
  [PyQt] source code is not running in REDHAT 7 linux platform shridhara 0 2,135 May-23-2018, 07:58 AM
Last Post: shridhara
  Errors while running dash plotly code Nischitha 3 5,279 Aug-24-2017, 10:54 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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