Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when running retire_users management command #1854

Closed
sentry-io bot opened this issue Sep 1, 2023 · 4 comments
Closed

error when running retire_users management command #1854

sentry-io bot opened this issue Sep 1, 2023 · 4 comments

Comments

@sentry-io
Copy link

sentry-io bot commented Sep 1, 2023

I ran

python manage.py retire_users --user=[REDACTED]@gmail.com

and got the following error:

Sentry Issue: MITXONLINE-32T

JSONDecodeError: Expecting value: line 4 column 1 (char 3)
  File "__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None

JSONDecodeError: Expecting value: line 4 column 1 (char 3)
(4 additional frame(s) were not displayed)
...
  File "manage.py", line 19, in <module>
    execute_from_command_line(sys.argv)
  File "users/management/commands/retire_users.py", line 110, in handle
    resp = bulk_retire_edx_users(user.username)
  File "openedx/api.py", line 930, in bulk_retire_edx_users
    response = edx_client.bulk_user_retirement.retire_users({"usernames": usernames})
@asadali145
Copy link
Contributor

As per my R&D, it seems like the configurations added in mitodl/salt-ops#1574 & mitodl/ol-infrastructure#1667 are not deployed on Production and that is the reason that edX is returning 200 but that status is from a redirected page. So, the response is not JSON serializable. I have asked the DevOps team to look into it.

CC: @pdpinch @arslanashraf7

@pdpinch
Copy link
Member

pdpinch commented Sep 4, 2023

Thanks Asad. Open edx deployments to prod have been held up by issues with proctored exams. We may have to wait a week or two, depending on what devops has to say.

@pdpinch pdpinch added the blocked label Sep 5, 2023
@pdpinch
Copy link
Member

pdpinch commented Sep 5, 2023

This is blocked until we get a release to production that includes mitodl/salt-ops#1574 and mitodl/ol-infrastructure#1667

@pdpinch
Copy link
Member

pdpinch commented Sep 13, 2023

This was fixed after Asad's config settings were deployed to production.

@pdpinch pdpinch closed this as completed Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants