8000 RuntimeError: dictionary keys changed during iteration · Issue #207 · litl/rauth · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
RuntimeError: dictionary keys changed during iteration #207
Open
@tetractius

Description

@tetractius

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0