gnmi
gnmi copied to clipboard
Unable to import gnmi_pb2.py due to gnmi_ext import
The import for the gnmi_ext package in gnmi_pb2.py here
https://github.com/openconfig/gnmi/blob/master/proto/gnmi/gnmi_pb2.py#L19
doesn't actually exist in any package as far as I can tell and makes it impossible to import gnmi_pb2.py in Python. Could someone point me towards how to import this module correctly?
This file was last regenerated on June 20. Is your repository synced to head?
https://github.com/openconfig/gnmi/blob/master/proto/gnmi_ext/gnmi_ext_pb2.py
On Tue, Jul 31, 2018 at 1:50 PM Colin McIntosh [email protected] wrote:
The import for the gnmi_ext package in gnmi_pb2.py here
https://github.com/openconfig/gnmi/blob/master/proto/gnmi/gnmi_pb2.py#L19
doesn't actually exist in any package as far as I can tell and makes it impossible to import gnmi_pb2.py in Python. Could someone point me towards how to import this module correctly?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openconfig/gnmi/issues/34, or mute the thread https://github.com/notifications/unsubscribe-auth/ARfIL84UknZKu6PdnzRXoRdQOmeeE0X2ks5uMMMwgaJpZM4VpY1Z .
I can take a look at this. Apologies for the latency.
I'm having this same issue. Is there a workaround or procedure to make this work?
I can not find the descriptor.proto file in the import path: import "google/protobuf/descriptor.proto"; I searched around, could not locate "proto3" version of "descriptor.proto". Could someone help?
It looks like @remingtonc was able to workaround this issue and generate the appropriate Python modules from the .proto file here: https://github.com/cisco-ie/cisco-gnmi-python/blob/2de751029fba7baabe9f69406129f2b7f1d9683b/update_protos.sh
An example of the correctly generated Python modules are located here: https://github.com/cisco-ie/cisco-gnmi-python/tree/master/src/cisco_gnmi/proto
This is still a major problem. I tried following instructions from here and here, but I found my self spending hours messing with source files and changing file paths and directory structure. Finally had to stop as this whole processes is messy and did not seem right. Is this behavior expected? Can someone fix this please? @colinmcintosh, I tried the bash script, ran into errors (couldn't copy from github locations).