FileNotFoundErrorbrowsing

I got an error when my program tried to open file f=open('dia.dat','r') if it starts from home screen.No errors if it starts from IDE. Error message:
FileNotFoundError
[Errno 2] No such file or directory: 'via.dat'
How to fix the problem?