Retire user slave script retire_forum error

Description

I tried to invoke the slave retire_forum script (https://github.com/edx/tubular/blob/master/tubular/scripts/retire_one_learner.py) from my local machine against https://courses.stage.edx.org.
And I encountered the error below.
Looks like the URL to retire forum is not correct. See https://github.com/edx/edx-platform/pull/17818/files

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 scripts/retire_one_learner.py:198: Warning: Click detected the use of the unicode_literals __future__ import. This is heavily discouraged because it can introduce subtle bugs in your code. You should instead use explicit u"" literals for your unicode strings. For more information see http://click.pocoo.org/python3/ default='http://localhost' scripts/retire_one_learner.py:287: Warning: Click detected the use of the unicode_literals __future__ import. This is heavily discouraged because it can introduce subtle bugs in your code. You should instead use explicit u"" literals for your unicode strings. For more information see http://click.pocoo.org/python3/ retire_learner(auto_envvar_prefix='RETIREMENT') Learner Retirement: Starting learner retiremenet for simongdprstage DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): courses.stage.edx.org DEBUG:urllib3.connectionpool:https://courses.stage.edx.org:443 "POST /oauth2/access_token HTTP/1.1" 200 553 DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): courses.stage.edx.org DEBUG:urllib3.connectionpool:https://courses.stage.edx.org:443 "POST /oauth2/access_token HTTP/1.1" 200 553 DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): courses.stage.edx.org DEBUG:urllib3.connectionpool:https://courses.stage.edx.org:443 "POST /oauth2/access_token HTTP/1.1" 200 553 DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): courses.stage.edx.org DEBUG:urllib3.connectionpool:https://courses.stage.edx.org:443 "GET /api/user/v1/accounts/simongdprstage/retirement_status/ HTTP/1.1" 200 346 Learner Retirement: Starting state RETIRING_FORUMS DEBUG:urllib3.connectionpool:https://courses.stage.edx.org:443 "PATCH /api/user/v1/accounts/update_retirement_status/ HTTP/1.1" 204 0 DEBUG:urllib3.connectionpool:https://courses.stage.edx.org:443 "POST /api/user/v1/accounts/retire_forum/ HTTP/1.1" 404 11159 Traceback (most recent call last): File "scripts/retire_one_learner.py", line 287, in <module> retire_learner(auto_envvar_prefix='RETIREMENT') File "/Users/schen/.virtualenvs/tubular/lib/python2.7/site-packages/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/Users/schen/.virtualenvs/tubular/lib/python2.7/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/Users/schen/.virtualenvs/tubular/lib/python2.7/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/Users/schen/.virtualenvs/tubular/lib/python2.7/site-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "scripts/retire_one_learner.py", line 272, in retire_learner exc_msg += '\n' + unicode(exc.content) UnicodeDecodeError: 'ascii' codec can't decode byte 0xd8 in position 24019: ordinal not in range(128)

Furthermore, if I tried to invoke the script again with the current state, it encounters another error

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 scripts/retire_one_learner.py:198: Warning: Click detected the use of the unicode_literals __future__ import. This is heavily discouraged because it can introduce subtle bugs in your code. You should instead use explicit u"" literals for your unicode strings. For more information see http://click.pocoo.org/python3/ default='http://localhost' scripts/retire_one_learner.py:287: Warning: Click detected the use of the unicode_literals __future__ import. This is heavily discouraged because it can introduce subtle bugs in your code. You should instead use explicit u"" literals for your unicode strings. For more information see http://click.pocoo.org/python3/ retire_learner(auto_envvar_prefix='RETIREMENT') Learner Retirement: Starting learner retiremenet for simongdprstage DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): courses.stage.edx.org DEBUG:urllib3.connectionpool:https://courses.stage.edx.org:443 "POST /oauth2/access_token HTTP/1.1" 200 549 DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): courses.stage.edx.org DEBUG:urllib3.connectionpool:https://courses.stage.edx.org:443 "POST /oauth2/access_token HTTP/1.1" 200 549 DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): courses.stage.edx.org DEBUG:urllib3.connectionpool:https://courses.stage.edx.org:443 "POST /oauth2/access_token HTTP/1.1" 200 549 DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): courses.stage.edx.org DEBUG:urllib3.connectionpool:https://courses.stage.edx.org:443 "GET /api/user/v1/accounts/simongdprstage/retirement_status/ HTTP/1.1" 200 368 Learner Retirement: User is already in a working state! RETIRING_FORUMS Learner Retirement: None

Steps to Reproduce

None

Current Behavior

None

Expected Behavior

None

Reason for Variance

None

Release Notes

None

User Impact Summary

None

Status

Assignee

Brian Beggs

Reporter

Simon Chen

Reach

None

Impact

None

Customer

None

Partner Manager

None

URL

None

Contributor Name

None

Groups with Read-Only Access

None

Actual Points

None

Category of Work

None

Stakeholders

None

Priority

Unset
Configure