def fileopen(self):
try:
self.v = self.fileName.get()
with open(self.v, "r") as r:
content = r.read()
self.contents.insert(INSERT, content)
except:
messagebox.showwarning("error", "file not found")