Okay so I need to do a file test for a program by creating/opening(if the file exists) and append some text to it to confirm that it works. Before I started adding in modules in the test went perfectly fine but once I finished putting in the modules and started working with the GUI with the Tkinter
module now I get an error that an integer is required. There is a post about it but in there the person just messed up something with readline()
which is not the case for me. I think it has to do with the JSON
module or the fact that I added in #!/usr/bin/env python
after the file test but I don't know.
Here's my code
#!/usr/bin/env python
#shit to import
from json import *
from os import *
from sys import *
from numpy import *
from datetime import *
from tkinter import *
#testing
with open("test.txt","a") as file:
file.read()
file.write("The test has been completed \n")
#GUI
win = Tk()
win.mainloop()