What changed with protobuf dependency recently that made proto.Message.to_dict no longer work?
In my program I have been using google-cloud-vision 3.4.5 in Python 3.11 for months. Today, I tried to set up my program to run on a new computer, and I noticed that the program always failed at the point in the code where I called proto.Message.to_dict to convert my image annotation result to a dictionary. Python was reporting that the result was not of type “Message”. I was then able to reproduce the problem on my old computer by creating a new Python 3.11 Anaconda environment, which has a bunch of dependencies newer than the existing one. When I debugged on my old environment vs the new environment, I noticed on the old one the AnnotateImageResponse has the metaclass MessageMeta, whereas on the new one the type is GeneratedProtocolMessageType. In PyCharm:
What changed with protobuf dependency recently that made proto.Message.to_dict no longer work?
In my program I have been using google-cloud-vision 3.4.5 in Python 3.11 for months. Today, I tried to set up my program to run on a new computer, and I noticed that the program always failed at the point in the code where I called proto.Message.to_dict to convert my image annotation result to a dictionary. Python was reporting that the result was not of type “Message”. I was then able to reproduce the problem on my old computer by creating a new Python 3.11 Anaconda environment, which has a bunch of dependencies newer than the existing one. When I debugged on my old environment vs the new environment, I noticed on the old one the AnnotateImageResponse has the metaclass MessageMeta, whereas on the new one the type is GeneratedProtocolMessageType. In PyCharm: