I think since you didn't upload a picture of your problem that you have a path problem
so try to put ur file transaction.py and the file you import from in the same folder
like this :
or you will need to import it by accessing the path
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…