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

handle null values in logfiles #28

Merged
merged 1 commit into from
Oct 21, 2018

Conversation

anarcat
Copy link
Contributor

@anarcat anarcat commented Aug 26, 2018

In my experience, the CSV logfile frequently gets garbage written to
it. It's unclear to me why that happens: presumably the update script
does that when there's a power outage or suspend or something weird
that frequently happens on laptops.

Instead of trying to figure out how the impossible happens, I figured
it might be better to just deal with it better and silence those
errors. I tried to do this in a better way by using an open hook, but
it's actually quite difficult to do so because compressed handles
don't support customizing the encoding routines the same way io.open
does. Instead we monkeypatch the iterator eventually used by the CSV
parser, which works in my tests.

In my experience, the CSV logfile frequently gets garbage written to
it. It's unclear to me why that happens: presumably the update script
does that when there's a power outage or suspend or something weird
that frequently happens on laptops.

Instead of trying to figure out how the impossible happens, I figured
it might be better to just deal with it better and silence those
errors. I tried to do this in a better way by using an open hook, but
it's actually quite difficult to do so because compressed handles
don't support customizing the encoding routines the same way io.open
does. Instead we monkeypatch the iterator eventually used by the CSV
parser, which works in my tests.
@petterreinholdtsen petterreinholdtsen merged commit b231366 into petterreinholdtsen:master Oct 21, 2018
@anarcat anarcat deleted the null-fixes branch October 23, 2018 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants