aliyun / aliyun-tablestore-python-sdk

Aliyun Tablestore (原OTS) Python SDK
https://www.aliyun.com/product/ots
MIT License
50 stars 37 forks source link

occur error when upgrade protobuf to 3.6.0 #2

Open sidedger opened 6 years ago

sidedger commented 6 years ago

tablestore 4.3.0 protobuf 3.6.0

File "D:\Anaconda3\lib\site-packages\tablestore-4.3.0-py3.6.egg\tablestore\protobuf\table_store_pb.py", line 14, in serialized_pb='\n\x11table_store.proto\x12\x1e\x63om.aliyun.tablestore.protocol\"&\n\x05\x45rror\x12\x0c\n\x04\x63ode\x18\x01 \x02(\t\x12\x0f\n\x07message\x18\x02 \x01(\t\"\xa0\x01\n\x10PrimaryKeySchema\x12\x0c\n\x04name\x18\x01 \x02(\t\x12<\n\x04type\x18\x02 \x02(\x0e\x32..com.aliyun.tablestore.protocol.PrimaryKeyType\x12@\n\x06option\x18\x03 \x01(\x0e\x32\x30.com.aliyun.tablestore.protocol.PrimaryKeyOption\",\n\x0ePartitionRange\x12\r\n\x05\x62\x65gin\x18\x01 \x02(\x0c\x12\x0b\n\x03\x65nd\x18\x02 \x02(\x0c\"a\n\x0cTableOptions\x12\x14\n\x0ctime_to_live\x18\x01 \x01(\x05\x12\x14\n\x0cmax_versions\x18\x02 \x01(\x05\x12%\n\x1d\x64\x65viation_cell_version_in_sec\x18\x05 \x01(\x03\"f\n\tTableMeta\x12\x12\n\ntable_name\x18\x01 \x02(\t\x12\x45\n\x0bprimary_key\x18\x02 \x03(\x0b\x32\x30.com.aliyun.tablestore.protocol.PrimaryKeySchema\"u\n\tCondition\x12N\n\rrow_existence\x18\x01 \x02(\x0e\x32\x37.com.aliyun.tablestore.protocol.RowExistenceExpectation\x12\x18\n\x10\x63olumn_condition\x18\x02 \x01(\x0c\"+\n\x0c\x43\x61pacityUnit\x12\x0c\n\x04read\x18\x01 \x01(\x05\x12\r\n\x05write\x18\x02 \x01(\x05\"\x98\x01\n\x19ReservedThroughputDetails\x12\x43\n\rcapacity_unit\x18\x01 \x02(\x0b\x32,.com.aliyun.tablestore.protocol.CapacityUnit\x12\x1a\n\x12last_increase_time\x18\x02 \x02(\x03\x12\x1a\n\x12last_decrease_time\x18\x03 \x01(\x03\"Y\n\x12ReservedThroughput\x12\x43\n\rcapacity_unit\x18\x01 \x02(\x0b\x32,.com.aliyun.tablestore.protocol.CapacityUnit\"W\n\x10\x43onsumedCapacity\x12\x43\n\rcapacity_unit\x18\x01 \x02(\x0b\x32,.com.aliyun.tablestore.protocol.CapacityUnit\"\xad\x02\n\x12\x43reateTableRequest\x12=\n\ntable_meta\x18\x01 \x02(\x0b\x32).com.aliyun.tablestore.protocol.TableMeta\x12O\n\x13reserved_throughput\x18\x02 \x02(\x0b\x32\x32.com.aliyun.tablestore.protocol.ReservedThroughput\x12\x43\n\rtable_options\x18\x03 \x01(\x0b\x32,.com.aliyun.tablestore.protocol.TableOptions\x12\x42\n\npartitions\x18\x04 \x03(\x0b\x32..com.aliyun.tablestore.protocol.PartitionRange\"\x15\n\x13\x43reateTableResponse\"\xbe\x01\n\x12UpdateTableRequest\x12\x12\n\ntable_name\x18\x01 \x02(\t\x12O\n\x13reserved_throughput\x18\x02 \x01(\x0b\x32\x32.com.aliyun.tablestore.protocol.ReservedThroughput\x12\x43\n\rtable_options\x18\x03 \x01(\x0b\x32,.com.aliyun.tablestore.protocol.TableOptions\"\xba\x01\n\x13UpdateTableResponse\x12^\n\x1breserved_throughput_details\x18\x01 \x02(\x0b\x32\x39.com.aliyun.tablestore.protocol.ReservedThroughputDetails\x12\x43\n\rtable_options\x18\x02 \x02(\x0b\x32,.com.aliyun.tablestore.protocol.TableOptions\"\n\x14\x44\x65scribeTableRequest\x12\x12\n\ntable_name\x18\x01 \x02(\t\"\x91\x02\n\x15\x44\x65scribeTableResponse\x12=\n\ntable_meta\x18\x01 \x02(\x0b\x32).com.aliyun.tablestore.protocol.TableMeta\x12^\n\x1breserved_throughput_details\x18\x02 \x02(\x0b\x32\x39.com.aliyun.tablestore.protocol.ReservedThroughputDetails\x12\x43\n\rtable_options\x18\x03 \x02(\x0b\x32,.com.aliyun.tablestore.protocol.TableOptions\x12\x14\n\x0cshard_splits\x18\x06 \x03(\x0c\"\x12\n\x10ListTableRequest\"(\n\x11ListTableResponse\x12\x13\n\x0btable_names\x18\x01 \x03(\t\"(\n\x12\x44\x65leteTableRequest\x12\x12\n\ntable_name\x18\x01 \x02(\t\"\x15\n\x13\x44\x65leteTableResponse\"&\n\x10LoadTableRequest\x12\x12\n\ntable_name\x18\x01 \x02(\t\"\x13\n\x11LoadTableResponse\"(\n\x12UnloadTableRequest\x12\x12\n\ntable_name\x18\x01 \x02(\t\"\x15\n\x13UnloadTableResponse\"H\n\tTimeRange\x12\x12\n\nstart_time\x18\x01 \x01(\x03\x12\x10\n\x08\x65nd_time\x18\x02 \x01(\x03\x12\x15\n\rspecific_time\x18\x03 \x01(\x03\"P\n\rReturnContent\x12?\n\x0breturn_type\x18\x01 \x01(\x0e\x32.com.aliyun.tablestore.protocol.ReturnType\"\xee\x01\n\rGetRowRequest\x12\x12\n\ntable_name\x18\x01 \x02(\t\x12\x13\n\x0bprimary_key\x18\x02 \x02(\x0c\x12\x16\n\x0e\x63olumns_to_get\x18\x03 \x03(\t\x12=\n\ntime_range\x18\x04 \x01(\x0b\x32).com.aliyun.tablestore.protocol.TimeRange\x12\x14\n\x0cmax_versions\x18\x05 \x01(\x05\x12\x0e\n\x06\x66ilter\x18\x07 \x01(\x0c\x12\x14\n\x0cstart_column\x18\x08 \x01(\t\x12\x12\n\nend_column\x18\t \x01(\t\x12\r\n\x05token\x18\n \x01(\x0c\"u\n\x0eGetRowResponse\x12\x42\n\x08\x63onsumed\x18\x01 \x02(\x0b\x32\x30.com.aliyun.tablestore.protocol.ConsumedCapacity\x12\x0b\n\x03row\x18\x02 \x02(\x0c\x12\x12\n\nnext_token\x18\x03 \x01(\x0c\"\xbf\x01\n\x10UpdateRowRequest\x12\x12\n\ntable_name\x18\x01 \x02(\t\x12\x12\n\nrow_change\x18\x02 \x02(\x0c\x12<\n\tcondition\x18\x03 \x02(\x0b\x32).com.aliyun.tablestore.protocol.Condition\x12\x45\n\x0ereturn_content\x18\x04 \x01(\x0b\x32-.com.aliyun.tablestore.protocol.ReturnContent\"d\n\x11UpdateRowResponse\x12\x42\n\x08\x63onsumed\x18\x01 \x02(\x0b\x32\x30.com.aliyun.tablestore.protocol.ConsumedCapacity\x12\x0b\n\x03row\x18\x02 \x01(\x0c\"\xb5\x01\n\rPutRowRequest\x12\x12\n\ntable_name\x18\x01 \x02(\t\x12\x0b\n\x03row\x18\x02 \x02(\x0c\x12<\n\tcondition\x18\x03 \x02(\x0b\x32).com.aliyun.tablestore.protocol.Condition\x12\x45\n\x0ereturn_content\x18\x04 \x01(\x0b\x32-.com.aliyun.tablestore.protocol.ReturnContent\"a\n\x0ePutRowResponse\x12\x42\n\x08\x63onsumed\x18\x01 \x02(\x0b\x32\x30.com.aliyun.tablestore.protocol.ConsumedCapacity\x12\x0b\n\x03row\x18\x02 \x01(\x0c\"\xc0\x01\n\x10\x44\x65leteRowRequest\x12\x12\n\ntable_name\x18\x01 \x02(\t\x12\x13\n\x0bprimary_key\x18\x02 \x02(\x0c\x12<\n\tcondition\x18\x03 \x02(\x0b\x32).com.aliyun.tablestore.protocol.Condition\x12\x45\n\x0ereturn_content\x18\x04 \x01(\x0b\x32-.com.aliyun.tablestore.protocol.ReturnContent\"d\n\x11\x44\x65leteRowResponse\x12\x42\n\x08\x63onsumed\x18\x01 \x02(\x0b\x32\x30.com.aliyun.tablestore.protocol.ConsumedCapacity\x12\x0b\n\x03row\x18\x02 \x01(\x0c\"\xfa\x01\n\x19TableInBatchGetRowRequest\x12\x12\n\ntable_name\x18\x01 \x02(\t\x12\x13\n\x0bprimary_key\x18\x02 \x03(\x0c\x12\r\n\x05token\x18\x03 \x03(\x0c\x12\x16\n\x0e\x63olumns_to_get\x18\x04 \x03(\t\x12=\n\ntime_range\x18\x05 \x01(\x0b\x32).com.aliyun.tablestore.protocol.TimeRange\x12\x14\n\x0cmax_versions\x18\x06 \x01(\x05\x12\x0e\n\x06\x66ilter\x18\x08 \x01(\x0c\x12\x14\n\x0cstart_column\x18\t \x01(\t\x12\x12\n\nendcolumn\x18\n \x01(\t\"\n\x12\x42\x61tchGetRowRequest\x12I\n\x06tables\x18\x01 \x03(\x0b\x32\x39.com.aliyun.tablestore.protocol.TableInBatchGetRowRequest\"\xc4\x01\n\x18RowInBatchGetRowResponse\x12\r\n\x05is_ok\x18\x01 \x02(\x08\x12\x34\n\x05\x65rror\x18\x02 \x01(\x0b\x32%.com.aliyun.tablestore.protocol.Error\x12\x42\n\x08\x63onsumed\x18\x03 \x01(\x0b\x32\x30.com.aliyun.tablestore.protocol.ConsumedCapacity\x12\x0b\n\x03row\x18\x04 \x01(\x0c\x12\x12\n\nnext_token\x18\x05 \x01(\x0c\"x\n\x1aTableInBatchGetRowResponse\x12\x12\n\ntable_name\x18\x01 \x02(\t\x12\x46\n\x04rows\x18\x02 \x03(\x0b\x32\x38.com.aliyun.tablestore.protocol.RowInBatchGetRowResponse\"a\n\x13\x42\x61tchGetRowResponse\x12J\n\x06tables\x18\x01 \x03(\x0b\x32:.com.aliyun.tablestore.protocol.TableInBatchGetRowResponse\"\xf1\x01\n\x19RowInBatchWriteRowRequest\x12;\n\x04type\x18\x01 \x02(\x0e\x32-.com.aliyun.tablestore.protocol.OperationType\x12\x12\n\nrow_change\x18\x02 \x02(\x0c\x12<\n\tcondition\x18\x03 \x02(\x0b\x32).com.aliyun.tablestore.protocol.Condition\x12\x45\n\x0ereturn_content\x18\x04 \x01(\x0b\x32-.com.aliyun.tablestore.protocol.ReturnContent\"z\n\x1bTableInBatchWriteRowRequest\x12\x12\n\ntable_name\x18\x01 \x02(\t\x12G\n\x04rows\x18\x02 \x03(\x0b\x32\x39.com.aliyun.tablestore.protocol.RowInBatchWriteRowRequest\"c\n\x14\x42\x61tchWriteRowRequest\x12K\n\x06tables\x18\x01 \x03(\x0b\x32;.com.aliyun.tablestore.protocol.TableInBatchWriteRowRequest\"\xb2\x01\n\x1aRowInBatchWriteRowResponse\x12\r\n\x05is_ok\x18\x01 \x02(\x08\x12\x34\n\x05\x65rror\x18\x02 \x01(\x0b\x32%.com.aliyun.tablestore.protocol.Error\x12\x42\n\x08\x63onsumed\x18\x03 \x01(\x0b\x32\x30.com.aliyun.tablestore.protocol.ConsumedCapacity\x12\x0b\n\x03row\x18\x04 \x01(\x0c\"|\n\x1cTableInBatchWriteRowResponse\x12\x12\n\ntable_name\x18\x01 \x02(\t\x12H\n\x04rows\x18\x02 \x03(\x0b\x32:.com.aliyun.tablestore.protocol.RowInBatchWriteRowResponse\"e\n\x15\x42\x61tchWriteRowResponse\x12L\n\x06tables\x18\x01 \x03(\x0b\x32<.com.aliyun.tablestore.protocol.TableInBatchWriteRowResponse\"\xf0\x02\n\x0fGetRangeRequest\x12\x12\n\ntable_name\x18\x01 \x02(\t\x12<\n\tdirection\x18\x02 \x02(\x0e\x32).com.aliyun.tablestore.protocol.Direction\x12\x16\n\x0e\x63olumns_to_get\x18\x03 \x03(\t\x12=\n\ntime_range\x18\x04 \x01(\x0b\x32).com.aliyun.tablestore.protocol.TimeRange\x12\x14\n\x0cmax_versions\x18\x05 \x01(\x05\x12\r\n\x05limit\x18\x06 \x01(\x05\x12#\n\x1binclusive_start_primary_key\x18\x07 \x02(\x0c\x12!\n\x19\x65xclusive_end_primary_key\x18\x08 \x02(\x0c\x12\x0e\n\x06\x66ilter\x18\n \x01(\x0c\x12\x14\n\x0cstart_column\x18\x0b \x01(\t\x12\x12\n\nend_column\x18\x0c \x01(\t\x12\r\n\x05token\x18\r \x01(\x0c\"\x98\x01\n\x10GetRangeResponse\x12\x42\n\x08\x63onsumed\x18\x01 \x02(\x0b\x32\x30.com.aliyun.tablestore.protocol.ConsumedCapacity\x12\x0c\n\x04rows\x18\x02 \x02(\x0c\x12\x1e\n\x16next_start_primary_key\x18\x03 \x01(\x0c\x12\x12\n\nnext_token\x18\x04 \x01(\x0c5\n\x0ePrimaryKeyType\x12\x0b\n\x07INTEGER\x10\x01\x12\n\n\x06STRING\x10\x02\x12\n\n\x06\x42INARY\x10\x03&\n\x10PrimaryKeyOption\x12\x12\n\x0e\x41UTO_INCREMENT\x10\x01M\n\x17RowExistenceExpectation\x12\n\n\x06IGNORE\x10\x00\x12\x10\n\x0c\x45XPECT_EXIST\x10\x01\x12\x14\n\x10\x45XPECT_NOT_EXIST\x10\x02$\n\nReturnType\x12\x0b\n\x07RT_NONE\x10\x00\x12\t\n\x05RT_PK\x10\x010\n\rOperationType\x12\x07\n\x03PUT\x10\x01\x12\n\n\x06UPDATE\x10\x02\x12\n\n\x06\x44\x45LETE\x10\x03&\n\tDirection\x12\x0b\n\x07\x46ORWARD\x10\x00\x12\x0c\n\x08\x42\x41\x43KWARD\x10\x01') File "D:\Anaconda3\Lib\site-packages\google\protobuf\descriptor.py", line 878, in new return _message.default_pool.AddSerializedFile(serialized_pb)

builtins.TypeError: expected bytes, str found

qiyuewuyi commented 6 years ago

使用最新版的 4.3.7就可以了。