I have written a script in which a function calls 2 different functions together using Multi Threading.
def video_image(link_ID): threadp = ThreadPool(processes=1) res = threadp.apply_async(displayImage,( link_ID)) return_val = res.get() tid = Thread(target=publishIAmFree) tid.start() if return_val == True: ............ ............ def displayImage(link_ID): playFlag = True os.system("pkill feh") cmd = "feh /home/fa/Desktop/%s" % (link_ID) os.system(cmd) return playFlag But, I am getting this error.
File "C:/Users/user1/PycharmProjects/MediPlayerStructured/venv/Include/main_new_concept.py", line 281, in videoImageFunction video_image(link_ID) File "C:/Users/user1/PycharmProjects/MediPlayerStructured/venv/Include/main_new_concept.py", line 349, in video_image return_val = res.get() File "C:\Users\user1\AppData\Local\Programs\Python\Python37\lib\multiprocessing\pool.py", line 657, in get raise self._value File "C:\Users\user1\AppData\Local\Programs\Python\Python37\lib\multiprocessing\pool.py", line 121, in worker result = (True, func(*args, **kwds)) TypeError: displayImage() takes 1 positional argument but 23 were given What is this error
TypeError: displayImage() takes 1 positional argument but 23 were given and how do I solve this?