Traceback (most recent call last): File "/home/geany/infrastructure/scripts/irclog.py", line 384, in main() File "/home/geany/infrastructure/scripts/irclog.py", line 380, in main irc_log_formatter.format() File "/home/geany/infrastructure/scripts/irclog.py", line 212, in format self._get_contents(self._input_filename) File "/home/geany/infrastructure/scripts/irclog.py", line 233, in _get_contents with open(file_name) as file_handle: FileNotFoundError: [Errno 2] No such file or directory: '/home/geany/supy/logs/ChannelLogger/Freenode/#geany/#geany.2019-10-13.log' FileNotFoundError: [Errno 2] No such file or directory: '/home/geany/supy/logs/ChannelLogger/Freenode/#geany/#geany.2019-10-13.log'
What exact link did you open? I don't find "latest log link" but assume you mean https://irc.geany.org/logs/current.php? Based on the issue create date(short after midnight UTC) and the fact that the link is working right now, I guess the logfile was already rotated but the new one not yet written to disk and so the file not found error occurred. The Supybot software buffers the logfile and only writes it every now and then to disk.
I guess I will make the script more robust to handle this case more gracefully.
I don't find "latest log link" but assume you mean https://irc.geany.org/logs/current.php?
Sorry "live" not latest, and yeah it goes to "current.php"
Based on the issue create date(short after midnight UTC) and the fact that the link is working right now, I guess the logfile was already rotated but the new one not yet written to disk and so the file not found error occurred.
Ok, I did see (on hexchat) that sweetgeany had restarted so possibly thats it.
The Supybot software buffers the logfile and only writes it every now and then to disk.
Maybe the rotation should create an empty file.
Closed #6 via 0915e3887af0d72b1b3726986fba02ee6be92126.
We cannot create an empty file on rotation as the rotation is done by Supybot and there is no option to achieve creating an empty file. Instead I added a check in the log processing script to check for the log file before reading it and if the log file is missing, a dummy log message is added.
Eventually looked close enough to rotation, works for me.
github-comments@lists.geany.org