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

RuntimeError: dictionary keys changed during iteration #207

Open
tetractius opened this issue May 8, 2020 · 0 comments
Open

RuntimeError: dictionary keys changed during iteration #207

tetractius opened this issue May 8, 2020 · 0 comments

Comments

@tetractius
Copy link

Couldn't find a similar issue, so opening a new one as code here seems still to be affected, but please close if I am wrong.

While I was trying some examples of SmugMug from https://gist.github.com/smugmug-api-docs/10046914

It seems that Python3.8 does like dictionaries under his chair in utils.py (was working fine with Python3.7 before upgrade ubuntu):

Traceback (most recent call last):
  File "./main.py", line 52, in <module>
    main()
  File "./main.py", line 34, in main
    at, ats = service.get_access_token(rt, rts, params={'oauth_verifier': verifier})
  File "/home/tetractius/PycharmProjects/SmugmugPyAuth/venv/lib/python3.8/site-packages/rauth/service.py", line 332, in get_access_token
    process_token_request(r, decoder, key_token, key_token_secret)
  File "/home/tetractius/PycharmProjects/SmugmugPyAuth/venv/lib/python3.8/site-packages/rauth/service.py", line 20, in process_token_request
    data = decoder(r.content)
  File "/home/tetractius/PycharmProjects/SmugmugPyAuth/venv/lib/python3.8/site-packages/rauth/utils.py", line 26, in parse_utf8_qsl
    for k, v in d.items():  # pragma: no cover
RuntimeError: dictionary keys changed during iteration

I just tried to create a copy of the dictionary d for iteration-only purposes, and that seems to be enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant