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

Uncaught AttributeError during decode #212

Open
msuozzo opened this issue Apr 3, 2018 · 0 comments · May be fixed by #302
Open

Uncaught AttributeError during decode #212

msuozzo opened this issue Apr 3, 2018 · 0 comments · May be fixed by #302

Comments

@msuozzo
Copy link
Member

msuozzo commented Apr 3, 2018

When a decode encounters a MessageField which has a non-dict value (e.g. "None" or "1"), an uncaught AttributeError is raised. The following is an associated stack trace:

File "apitools/base/py/encoding.py", line 110, in DictToMessage
  return JsonToMessage(message_type, json.dumps(d))
File "apitools/base/py/encoding.py", line 104, in JsonToMessage
  return _ProtoJsonApiTools.Get().decode_message(message_type, message)
File "apitools/base/py/encoding.py", line 290, in decode_message
  message_type, result)
File "apitools/base/protorpclite/protojson.py", line 211, in decode_message
  message = self.__decode_dictionary(message_type, dictionary)
File "apitools/base/protorpclite/protojson.py", line 284, in __decode_dictionary
  for item in value]
File "apitools/base/py/encoding.py", line 312, in decode_field
  field.message_type, json.dumps(value))
File "apitools/base/py/encoding.py", line 290, in decode_message
  message_type, result)
File "apitools/base/protorpclite/protojson.py", line 211, in decode_message
  message = self.__decode_dictionary(message_type, dictionary)
File "apitools/base/protorpclite/protojson.py", line 262, in __decode_dictionary
  for key, value in six.iteritems(dictionary):
File "six/__init__.py", line 605, in iteritems
  return d.iteritems(**kw)
@vladbarosan vladbarosan linked a pull request Oct 1, 2020 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants
@msuozzo and others