Page MenuHomePhabricator

ASHreyash7 (Shreyash)
User

Projects

User does not belong to any projects.

Today

  • Clear sailing ahead.

Tomorrow

  • Clear sailing ahead.

Tuesday

  • Clear sailing ahead.

User Details

User Since
Mar 5 2024, 8:51 PM (16 w, 4 d)
Availability
Available
LDAP User
Unknown
MediaWiki User
ASHreyash7 [ Global Accounts ]

Recent Activity

Mar 6 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".

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

Yes , I understood it . Thank you

are you able to get passsed the error? @ASHreyash7

Mar 6 2024, 7:18 AM · Outreachy (Round 28)
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".

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 6 2024, 6:43 AM · Outreachy (Round 28)

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".

Mar 5 2024, 10:32 PM · Outreachy (Round 28)