My directory structure is as follows:

     |-test.py
     |-test.proto
     |-test_pb2.py
     |-__init__.py
     |-comm
        |-comm.proto
        |-comm_pb2.py
        |-__init__.py  

both \_\_init__.py is empty
and **test.proto** is like this:

    package test;
    import "comm/comm.proto";

    message Test{
    optional comm.Foo foo = 1;
    }
and **comm.proto** is like this:

    package comm;

    message Foo{}

i successfuly used command *protoc --python_out=. -I.* to compile 
**comm.proto** and **test.proto**
but when i tried to import ***test_pb2*** in ***test.py***, i encounter 
this error

    TypeError: Couldn't build proto file into descriptor pool: Depends on 
file 'comm/comm.proto', but it has not been loaded


Can someone help me identify the reason and provide a solution, please?

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/eab6e347-84d6-43f4-aa13-45aada43f656n%40googlegroups.com.

Reply via email to