I execute my code in linux environment. My code is: from os import * def insert_text_file(self, strng): t=open("elements_file.txt", "a") t.write(strng) t.close() I'm getting this error: <type 'exception.TypeError'>: an integer is required Where is the mistake? Help me, please!!