f = open("yourfile.txt", "r") TypeError: an integer is required (got type str)
#if you got a code like this
from os import *
f = open("yourfile.txt", "r")
print(f.read())
f.close()
#It'll return an error
#The reason is: os module got a function call open, require 2 arguments. But you want
the bulit-in open function. The way to fix this is
#change
from os import *
#to
import os
#notice that if your code has some function use the os module, you know what to do:
#example: change
path.listdir(path)
#to
os.path.listdir(path)
#now you're good to go!