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

Pacific Power website instability causing scraper to end early #68

Open
s-egge opened this issue Aug 5, 2024 · 1 comment
Open

Pacific Power website instability causing scraper to end early #68

s-egge opened this issue Aug 5, 2024 · 1 comment
Labels
bug Something isn't working priority-low

Comments

@s-egge
Copy link
Member

s-egge commented Aug 5, 2024

The PP scraper has been reporting duplicate upload errors over the weekend due to this issue. After reading the logs, the scraper also appears to be stopping after only a few meters, which is unrelated to the duplicate data issue.

While troubleshooting, it seems like some meters on the Pacific Power website are not showing data for the monthly data tab even after switching back and forth/refreshing/logging in and out/etc. These meters have historically had monthly data and probably still do, but Pacific Power is unable to show it right now. The scraper has been able to get the data to show in the past by switching back and forth between yearly/monthly, but it's not working in this case. Based on the logs and testing, this is happening to different meters on different days, and each time is causing the scraper to end early as it thinks it's at the end of the list of meters with monthly data (previously, all meters without monthly data have been at the bottom so the scraper ends when it finds one without monthly data). One of the meters that wouldn't show monthly data on 08/03 is showing it now, for example, which leads me to believe this is likely the Pacific Power site being unreliable.

A possible fix is adding a counter for meters without monthly data, and stopping after so many of them are found in a row, which should be a better indication that we have reached the bottom of the monthly meters. This will allow the scraper to skip over meters that it cannot get to show monthly data for and then upload the missing data over the next day/few days if the meter fixes itself.

@s-egge s-egge added bug Something isn't working priority-med labels Aug 5, 2024
@s-egge
Copy link
Member Author

s-egge commented Aug 12, 2024

This hasn't happened again since the first time, so I'm moving the priority to low since it seems like a very rare issue and will be difficult to duplicate/test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-low
Projects
None yet
Development

No branches or pull requests

1 participant