def askopenfilename(self):
    filename= tkFileDialog.askopenfilename(initialdir='C:/..',title='Select File' ,  filetypes=[('Bitmap Images', '*.bmp'),('Png Images', '*.png'),('Gif Images', '*.gif'),("Jpeg","*.jpg"),("All files", "*")])

    self.image = Image.open(filename)
    self.photo = ImageTk.PhotoImage(self.image)
    self.label = Label(self.photo)


def encode_files(self,image,data):
    #get the image file
    image = Image.open(self.photo)
    #get message from entry box
    data= self.data_entry 

    self.encoded = LSBSteg.encode(image, data)

Recommended Answers

All 2 Replies

Please post the entire error message as we have no idea where it may be coming from. The call to encode_files, may be the problem but that code is not included so we can't tell..

Here is a typical example:

def funk(arg1, arg2, arg3):
    pass

arg1 = 77
# call function with only one argument
funk(arg1)

''' error -->
Traceback (most recent call last):
  File "<module1>", line 5, in <module>
TypeError: funk() takes exactly 3 arguments (1 given)
'''
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.