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 = = ImageTk.PhotoImage(self.image)
    self.label = Label(

def encode_files(self,image,data):
    #get the image file
    image =
    #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):

arg1 = 77
# call function with only one argument

''' 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, learning, and sharing knowledge.