String field contains invalid UTF-8 data when serializing a protocol buffer. Use the 'bytes' type if you intend to send raw bytes.
[libprotobuf ERROR google/protobuf/wire_format.cc:1053] String field contains invalid UTF-8 data when serializing a protocol buffer. Use the 'bytes' type if you intend to send raw bytes.
原因是中间,用char[]把它截断了,造成utf8字符不完整
String field contains invalid UTF-8 data when serializing a protocol buffer. Use the 'bytes' type if you intend to send raw bytes.的更多相关文章
- wire_format.cc:1091] String field 'accountid' contains invalid UTF-8 data when serializing a protocol buffer. Use the 'bytes' type if you intend to send raw bytes.
原因: 在protobuf 的string字段中存在中文,序列化的时候会出现截断数据,string这个类型带有检查功能 解决方法: 把protobuf中存在中文的string字段类型 改为bytes ...
- mongodb 更新数组出现can't append to array using string field name
数据库内容大概如下: { _id:, "hero_list" : { " : { , , "equip" : [ [ ], [ ], [ ], { , ...
- 抓取某网站信息时遇到的问题及解决 The character set provided in ContentType is invalid. Cannot read content as string using an invalid character set
var response = httpClient.SendAsync(requestMessage).Result; content = response.Content.ReadAsStringA ...
- related Field has invalid lookup: icontains 解决方法
models.py 文件 # coding:utf8 from django.db import models class Book(models.Model): name = mod ...
- 使用xadmin搜索search_fields报错:Related Field got invalid lookup: icontains
一.问题描述 使用xadmin实现Django后台功能时,使用search_fields = [字段名,字段名],在搜索的时候报错Related Field got invalid lookup: i ...
- Django admin模块使用search时报错:django.core.exceptions.FieldError: Related Field got invalid lookup: contains
日志如下: <class 'django.core.handlers.wsgi.WSGIRequest'> ------------registered_admins: {'spaceCl ...
- 54.string field聚合以及fielddata原理初探
主要知识点: 直接对分词的term进行聚合后果 设置fielddata=true 直接用.keyword进行聚合 doc value 的性能问题 一.直接对分词的term进行聚合后果 ...
- Django_xadmin_TypeError: Related Field got invalid lookup: icontains
问题: 当我在给某一张表加上外键搜索的时候,会出现 TypeError: Related Field got invalid lookup: icontains 问题原因: a 表关联 b表,也就是说 ...
- Django中search fields报错:related Field has invalid lookup: icontains
models.py 文件 # coding:utf8from django.db import models class Book(models.Model): name = model ...
随机推荐
- php配置(php7.3)
[PHP] ;;;;;;;;;;;;;;;;;;; ; About php.ini ; ;;;;;;;;;;;;;;;;;;; ; PHP's initialization file, general ...
- log4j 具体解释
通常,我们都提供一个名为 log4j.properties的文件.在第一次调用到Log4J时,Log4J会在类路径(../web-inf/class/当然也能够放到其他不论什么文件夹.仅仅要该文件夹被 ...
- django 名词解释
1) 什么是slug http://stackoverflow.com/questions/427102/what-is-a-slug-in-django 如上链接红色部分就是slug,它就是链接的最 ...
- 多个client与一个server端通信的问题
多个client与一个server端通信的问题 上篇博文主要是讲的关于client与server端的通信问题.在上篇博文中当我们仅仅有一个client訪问我们的server时是能够正常执行的,可是当我 ...
- 关注PHPthinking官网微信公众号——红包来袭
欢迎大家扫描关注PHPthinking官方微信订阅号,我们将给您定期发送质量博文.新闻趣事.站点公告等等,同一时候还有PHPthinking准备的每日微信红包(金额不等,已发出百元红包)等着你! 官网 ...
- [办公应用]如何将excel合并单元格分拆后每个单元格上仍保留数据?
合并单元格虽然美观,但是无法进行排序.筛选等操作. 只有合并单元格拆分后才可以按常规进行统计.但是普通拆分后,excel仅保留合并单元格数据到区域左上角的单元格. 解决方案:选定多个合并单元格,应用本 ...
- Dijkstra算法——最短路径(转)
转自:http://www.cnblogs.com/biyeymyhjob/archive/2012/07/31/2615833.html Dijkstra算法 1.定义概览 Dijkstra(迪杰斯 ...
- nohup 程序在后台运营 避免 xshell 卡死 通过 nohup.out分析调取系统命令时的异常分析
nohup 程序在后台运营 避免 xshell 卡死 [root@admin1 after_fc_distributed]# nohup /root/anaconda3/bin/python da ...
- mysqld 与 python 邮件监控脚本 内存消耗对比
top - 21:38:40 up 1 day, 10:38, 5 users, load average: 0.00, 0.01, 0.17Tasks: 88 total, 1 running, 8 ...
- 容器ConcurrentHashMap原理(学习)
一.概述 HashMap 是非线程安全的,在不考虑性能问题的时候,我们的解决方案有 Hashtable 或者Collections.synchronizedMap(hashMap),这两种方式基本都是 ...