An error occurred: [Errno 2] No such file or directory: filename.csv

I'm having a problem, I have split what used to be my flask app into a background task and the flask app. I had problems were the background tasks took so much time that the website became slow.

It all almost went fine. The flask app is working but the background task only works locally. Its supposed to be ran by python anywheres scheduled tasks function. But the background task crashes and says that it didnt find a file it needs to run. The file in questions is located in the same folder as the background task.

I have tried using the path to it from my working directory and i have tried using relative path. Neither worked, altough relative path has been tested locally on my pc and that worked but not when uploaded to python anywhere.

Any ideas on what I'm doing wrong?

Could you show the exact error message with the traceback?