Closed
Description
Env: win10/python3.10.4/python-betterproto 2.0.0b4+
File "E:\PythonPrj\crud_test\tests\gprc_demos\my_python\hello\uftplink_server.py", line 56, in <module>
asyncio.run(main( port))
File "C:\Python310\Lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Python310\Lib\asyncio\base_events.py", line 646, in run_until_complete
return future.result()
File "E:\PythonPrj\crud_test\tests\gprc_demos\my_python\hello\uftplink_server.py", line 46, in main
server = Server([UftpLinkService()])
File "C:\Python310\Lib\site-packages\grpclib\server.py", line 601, in __init__
mapping.update(handler.__mapping__())
File "E:\PythonPrj\crud_test\tests\gprc_demos\my_python\hello\_proto2\uftplink\__init__.py", line 337, in __mapping__
betterproto_lib_google_protobuf.Empty,
builtins.NameError: name 'betterproto_lib_google_protobuf' is not defined
proto file:
syntax = "proto3";
import "google/protobuf/timestamp.proto";
import "google/protobuf/empty.proto";
package uftplink;
service UftpLink {
rpc startLink(google.protobuf.Empty) returns(Reply){}
rpc stopLink(google.protobuf.Empty) returns(Reply){}
}
message Reply{
bool success=1;//
string error=2;//
}