In T358095#9604641, @Thembo42 wrote:In T358095#9604629, @ASHreyash7 wrote:In T358095#9604113, @Satoshi_Sh wrote:In T358095#9603538, @ASHreyash7 wrote:Hello Mentors @Pablo @Isaac @CMyrick-WMF
I'm encountering an error with the code below when changing the granularity from "daily" to "hourly".p.article_views('en.wikipedia', ['Albedo', 'Agriculture'], granularity='hourly', start='20220101', end='20220103')
Error :- 'The pageview API returned nothing useful.
I will highly appreciate your assistance in this.
Hi Shreyash,
This is the source code from `python-mwviews/src/mwviews/api
/pageviews.py`. I believe they don't have any available data within your selected timeframe. That's why you get the error message. You can try another timeframe. Hope this helps your question.try: results = self.get_concurrent(urls) some_data_returned = False for result in results: if 'items' in result: some_data_returned = True else: continue for item in result['items']: output[parse_date(item['timestamp'])][item['project']] = item['views'] if not some_data_returned: raise Exception( 'The pageview API returned nothing useful at: {}'.format(urls) ) return outputYes , I understood it . Thank you
are you able to get passsed the error? @ASHreyash7
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Feed Advanced Search
Advanced Search
Advanced Search
Mar 6 2024
Mar 6 2024
ASHreyash7 added a comment to T358095: Outreachy Application Task: Tutorial for Wikipedia language-agnostic article quality modeling data.
ASHreyash7 added a comment to T358095: Outreachy Application Task: Tutorial for Wikipedia language-agnostic article quality modeling data.
In T358095#9604113, @Satoshi_Sh wrote:In T358095#9603538, @ASHreyash7 wrote:Hello Mentors @Pablo @Isaac @CMyrick-WMF
I'm encountering an error with the code below when changing the granularity from "daily" to "hourly".p.article_views('en.wikipedia', ['Albedo', 'Agriculture'], granularity='hourly', start='20220101', end='20220103')
Error :- 'The pageview API returned nothing useful.
I will highly appreciate your assistance in this.
Hi Shreyash,
This is the source code from `python-mwviews/src/mwviews/api
/pageviews.py`. I believe they don't have any available data within your selected timeframe. That's why you get the error message. You can try another timeframe. Hope this helps your question.try: results = self.get_concurrent(urls) some_data_returned = False for result in results: if 'items' in result: some_data_returned = True else: continue for item in result['items']: output[parse_date(item['timestamp'])][item['project']] = item['views'] if not some_data_returned: raise Exception( 'The pageview API returned nothing useful at: {}'.format(urls) ) return output
Mar 5 2024
Mar 5 2024
ASHreyash7 added a comment to T358095: Outreachy Application Task: Tutorial for Wikipedia language-agnostic article quality modeling data.
Hello Mentors @Pablo @Isaac @CMyrick-WMF
I'm encountering an error with the code below when changing the granularity from "daily" to "hourly".
Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct. · Wikimedia Foundation · Privacy Policy · Code of Conduct · Terms of Use · Disclaimer · CC-BY-SA · GPL · Credits