Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on latest log link on Geany IRC backlogs #6

Closed
elextr opened this issue Oct 13, 2019 · 4 comments
Closed

Error on latest log link on Geany IRC backlogs #6

elextr opened this issue Oct 13, 2019 · 4 comments
Assignees
Labels

Comments

@elextr
Copy link
Member

elextr commented Oct 13, 2019

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'

@eht16
Copy link
Member

eht16 commented Oct 13, 2019

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.

@eht16 eht16 self-assigned this Oct 13, 2019
@eht16 eht16 added the bug label Oct 13, 2019
@elextr
Copy link
Member Author

elextr commented Oct 13, 2019

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.

@eht16 eht16 closed this as completed in 0915e38 Oct 22, 2019
@eht16
Copy link
Member

eht16 commented Oct 22, 2019

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.

@elextr
Copy link
Member Author

elextr commented Oct 24, 2019

Eventually looked close enough to rotation, works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants