Page MenuHomePhabricator

Satoshi_Sh (Satoshi)
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, 12:46 AM (16 w, 5 d)
Availability
Available
LDAP User
Unknown
MediaWiki User
Satoshi Sh [ Global Accounts ]

Recent Activity

Mar 15 2024

Satoshi_Sh added a comment to T358095: Outreachy Application Task: Tutorial for Wikipedia language-agnostic article quality modeling data.

What's the last date for contribution submission 17 March or 2 April?

Mar 15 2024, 2:39 PM · Outreachy (Round 28)

Mar 12 2024

Satoshi_Sh added a comment to T358095: Outreachy Application Task: Tutorial for Wikipedia language-agnostic article quality modeling data.

Hi, I keep having error with my try-except code. Is like basically every date in the revision_timestamp returns an error.
This is despite me converting the column to a date_time and then string format to make the API call ready for comparison.
The date displayed on the screenshot are outside the date range included in the API call function.

Screenshot1_error_try-catch.png (256×623 px, 6 KB)

Mar 12 2024, 1:24 AM · Outreachy (Round 28)

Mar 11 2024

Satoshi_Sh added a comment to T358095: Outreachy Application Task: Tutorial for Wikipedia language-agnostic article quality modeling data.

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?

Mar 11 2024, 8:12 PM · Outreachy (Round 28)
Satoshi_Sh added a comment to T358095: Outreachy Application Task: Tutorial for Wikipedia language-agnostic article quality modeling data.

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?

Mar 11 2024, 7:51 PM · Outreachy (Round 28)
Satoshi_Sh added a comment to T358095: Outreachy Application Task: Tutorial for Wikipedia language-agnostic article quality modeling data.

Here is the screenshot.

Screenshot 2024-03-12 001726.png (258×1 px, 89 KB)

Mar 11 2024, 7:07 PM · Outreachy (Round 28)
Satoshi_Sh added a comment to T358095: Outreachy Application Task: Tutorial for Wikipedia language-agnostic article quality modeling data.

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 11 2024, 6:45 PM · Outreachy (Round 28)
Satoshi_Sh added a comment to T358095: Outreachy Application Task: Tutorial for Wikipedia language-agnostic article quality modeling data.

Hello Everyone, I'm getting an error after running the try except block. I've tried implementing other codes and have also tried to change the start and end dates as well as article names. But still, the issue persists. Any help here would certainly enhance my task completion, Thank you.

image.png (338×917 px, 62 KB)

Mar 11 2024, 1:16 PM · Outreachy (Round 28)

Mar 10 2024

Satoshi_Sh added a comment to T358095: Outreachy Application Task: Tutorial for Wikipedia language-agnostic article quality modeling data.

I modified the code but then it gave this error

Screenshot 2024-03-11 002416.png (301×1 px, 95 KB)

Then I visited the link in error message and this was displayed for two articles named Albedo and Agriculture
Screenshot 2024-03-11 002434.png (38×1 px, 10 KB)

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 10 2024, 10:48 PM · Outreachy (Round 28)

Mar 9 2024

Satoshi_Sh added a comment to T358095: Outreachy Application Task: Tutorial for Wikipedia language-agnostic article quality modeling data.

@Satoshi_Sh
When I use the start and end dates from revision timestamps for fetching the pageviews count for articles, it's giving the following error. Please help.

Screenshot 2024-03-10 014040.png (135×1 px, 28 KB)

Mar 9 2024, 8:38 PM · Outreachy (Round 28)
Satoshi_Sh added a comment to T358095: Outreachy Application Task: Tutorial for Wikipedia language-agnostic article quality modeling data.

This image seems not to be loading, is this a default setting or a fault from my end.

Screenshot 2024-03-09 at 20.20.12.png (488×2 px, 168 KB)

Mar 9 2024, 8:03 PM · Outreachy (Round 28)
Satoshi_Sh added a comment to T358095: Outreachy Application Task: Tutorial for Wikipedia language-agnostic article quality modeling data.

Hey @Satoshi_Sh, would you share the full link to `python-mwviews/src/mwviews/api

/pageviews.py`

Mar 9 2024, 4:12 PM · Outreachy (Round 28)
Satoshi_Sh added a comment to T358095: Outreachy Application Task: Tutorial for Wikipedia language-agnostic article quality modeling data.

Hello Everyone!!
I'm stuck with a Key error of 'revision_timestamp' column. As you all might get to know the dataset contains this column, still its throwing an error. I have tried printing column names but still, the output didn't print this column.

Screenshot 2024-03-08 191653.png (664×1 px, 89 KB)

Screenshot 2024-03-08 191641.png (666×1 px, 86 KB)

can anyone plz help me a bit about this or anyone got the same issue ?

I'm not 100% sure unless I check your whole notebook, but does that "df" data frame contain the "revision_timestamp" column? You might have another data frame.

You can double-check it with something like this.

`# Check dataframe columns
columns =df.columns
print(columns)`

yeah, I checked it several times and it shows that the column exists in the same dataframe.
Did you proceed to task 2 and got any errors with revision_timestamp column?

Mar 9 2024, 5:35 AM · Outreachy (Round 28)

Mar 8 2024

Satoshi_Sh added a comment to T358095: Outreachy Application Task: Tutorial for Wikipedia language-agnostic article quality modeling data.

Hello Everyone!!
I'm stuck with a Key error of 'revision_timestamp' column. As you all might get to know the dataset contains this column, still its throwing an error. I have tried printing column names but still, the output didn't print this column.

Screenshot 2024-03-08 191653.png (664×1 px, 89 KB)

Screenshot 2024-03-08 191641.png (666×1 px, 86 KB)

can anyone plz help me a bit about this or anyone got the same issue ?

Mar 8 2024, 4:57 PM · Outreachy (Round 28)

Mar 7 2024

Satoshi_Sh 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

Hi @Thembo42
The error occurs when certain timeframes lacks pageview count, Hence the API might raise an Exception in such case.
You need to handle such cases to get passed this error.
Hope this helps.

By handle, do you mean to choose a timeframe where all rows have a view count?

It should work if it has at least one data/row in your timeframe.

Yes, I understand that. I'm saying should we choose a granularity that just works, or we should choose (say hourly) and scan through the year to check for data because @ASHreyash7 was saying something like check for test cases. Should we check for test cases or simply choose another granularity-this is what I don't understand. Thank you.

Mar 7 2024, 4:39 PM · Outreachy (Round 28)
Satoshi_Sh 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

Hi @Thembo42
The error occurs when certain timeframes lacks pageview count, Hence the API might raise an Exception in such case.
You need to handle such cases to get passed this error.
Hope this helps.

By handle, do you mean to choose a timeframe where all rows have a view count?

Mar 7 2024, 2:52 AM · Outreachy (Round 28)

Mar 6 2024

Satoshi_Sh 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,

Mar 6 2024, 3:38 AM · Outreachy (Round 28)