User Details
- User Since
- Mar 5 2024, 12:46 AM (16 w, 5 d)
- Availability
- Available
- LDAP User
- Unknown
- MediaWiki User
- Satoshi Sh [ Global Accounts ]
Mar 15 2024
Mar 12 2024
Mar 11 2024
Ok. I checked for just two articles. Should I check for all the articles in order to know whether there is any data available for all the revision_timestamps of different articles? And what if no data is available for the dates mentioned in revision_timestamps?
I manually set the start and end dates for the year 2022 for two articles just to check whether my code is displaying the page views count or not and it did display the counts. But the task was to fetch start and end dates from revision_timestamps, so when I modified my code accordingly, it didn't fetch data and displayed the above error message in the screenshot. Is there data available for the dates mentioned in revision timestamps?
Here is the screenshot.
When I manually set the start and end dates for the year 2022, it displayed the page views count for that time frame but when dates are fetched from revision_timestamps, it displays no data available and prints the error message.
Mar 10 2024
I modified the code but then it gave this error
Then I visited the link in error message and this was displayed for two articles named Albedo and Agriculture
The error happens when there is no data at that timestamp. Use a try and catch block as suggested by others above.
I have already included a try-except block in the code which is printing the error message.
When I manually set the start and end dates for the year 2022, it displayed the page views count for that time frame but when dates are fetched from revision_timestamps, it displays no data available and prints the error message.
Mar 9 2024
Hey @Satoshi_Sh, would you share the full link to `python-mwviews/src/mwviews/api
/pageviews.py`