mugurdi
Posts: 68
Joined: Tue Oct 14, 2014 3:49 am

Where are errors stored when executing a Python program?

Tue Nov 20, 2018 5:39 am

Hello
I have a Raspberry connected to the home wifi, and sends to a web, via FTP, a file with the daily meteorological data of the previous day when the new day begins. For this I use a program in python.
The problem that I have is that some days the file arrives well to the server, other days the file does not arrive.
I do not know in which log file the error will be saved. Where are errors stored when executing a Python program?
I appreciate your help.

User avatar
rpdom
Posts: 17455
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Where are errors stored when executing a Python program?

Tue Nov 20, 2018 6:03 am

Wherever you send them.

How are you running the program? If you run from the command line prompt, the messages will appear on the screen. If you run from crontab, any output will be lost unless you redirect it to log files in the crontab entry.

User avatar
r3d4
Posts: 983
Joined: Sat Jul 30, 2011 8:21 am
Location: ./

Re: Where are errors stored when executing a Python program?

Tue Nov 20, 2018 9:45 am

:roll:
Last edited by r3d4 on Wed Nov 21, 2018 3:10 pm, edited 1 time in total.

mugurdi
Posts: 68
Joined: Tue Oct 14, 2014 3:49 am

Re: Where are errors stored when executing a Python program?

Wed Nov 21, 2018 5:29 am

Thanks!
I send it to a website that is private of mine . I created an FTP account there.

I send it from the main program that collects weather data:

Code: Select all

subprocess.Popen(["python3", "/home/pi/xxxx/send_FTP_yesyerday.py"])
The strange thing is that some voices send well, and other days it does not send the file. The file is always in his location.
I look for error messages

Return to “General discussion”