From 645c7250fb999553de125eabea1a9256a748d6f6 Mon Sep 17 00:00:00 2001 From: Aayog Koirala <1aayogkoirala@gmail.com> Date: Fri, 5 Nov 2021 19:43:55 -0400 Subject: [PATCH] A quick fix to app.py to have multiple images. I was trying to add an array of images, but the loadImage function doesn't change the key, I updated the self.images array to add keys. This will allow multiple images. --- app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app.py b/app.py index b6901b9..91ea01a 100644 --- a/app.py +++ b/app.py @@ -232,6 +232,9 @@ def loadImage(self,file_name): # Only working with complete file address key = 'PImage_'+str(len(self.images)) self.sendLine(key + ' = loadImage(\''+str(file_name)+'\''+')') + # The self.images is never updated, so the "key" remains the same + # can't upload multiple images + self.images.append(key) #resolves the issues and updates the self.images return key def image(self,*args):