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

"ObjectifiedElement" has not attribute XXX #61

Closed
hongyuan1306 opened this issue Mar 4, 2022 · 0 comments
Closed

"ObjectifiedElement" has not attribute XXX #61

hongyuan1306 opened this issue Mar 4, 2022 · 0 comments

Comments

@hongyuan1306
Copy link

Hi,

I am using objectify.fromstring to turn xml into python object, like this:

message = objectify.fromstring(xml)
print(message.MsgType)

However, runing mypy on the code will give something like:

message.py:104: error: "ObjectifiedElement" has no attribute "MsgType"

I think the type hinting of ObjectifiedElement shall allow arbitrary attribute, but it does not seem to work as I expected. How to make the error go away?

@scoder scoder closed this as completed in d29a5ee Mar 4, 2022
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