-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
TypeError: Couldn't build proto file into descriptor pool! #53
Comments
Such name conflict should be reported as an error in every implementation. The pure Python needs to be fixed to report an error as well. |
One problem is that in Python there isn't a central DecriptorPool with all generated types so it can't detect such conflicts. Unless such a DescriptorPool is introduced in Python, pure Python implementation won't be able to detect such conflicts. This also applies to Java. |
hi all, any update of this issue? I also met this issue. |
Hi feiyuw, if you met this issue, the right solution is to get rid of the duplicated messages (by changing the name of one of them). |
hi @xfxyjwf , the proto difinition is included in the to decode file together with protobuf message, and the file format is out of my control, now I use python implementation instead of cpp to work around this problem. |
running into this issue too, dropping back to python implementation fixed it. is the issue really that you can't have objects with the same name in separate is the issue just that common registry? |
I think using the same name for different message types is not a good practice. In your case, you can set different package names on these .proto files and that will avoid the conflict. |
they all have different package names |
If they all have different package names, they will not be considered as conflicts. Could you post the content of the .proto files and the exact error message you got? |
Added upb::FileDef, which represents the file defs are declared in.
@xfxyjwf how u solved this problem |
When objects with the same name are defined in two separate
.proto
files the above error is thrown only when using the C++ backend for PythonThe text was updated successfully, but these errors were encountered: