TypeError: memoryview: a bytes-like object is required, not 'str'
@laxmareddyp 已经在做这个了。
开始于 2023年9月24日。
评估
这个 Issue 还没有评估数据。
描述
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\object_detection\utils\label_map_util.py", line 175, in load_labelmap
text_format.Merge(label_map_string, label_map)
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\google\protobuf\text_format.py", line 719, in Merge
return MergeLines(
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\google\protobuf\text_format.py", line 793, in MergeLines
return parser.MergeLines(lines, message)
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\google\protobuf\text_format.py", line 818, in MergeLines
self._ParseOrMerge(lines, message)
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\google\protobuf\text_format.py", line 837, in _ParseOrMerge
self._MergeField(tokenizer, message)
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\google\protobuf\text_format.py", line 967, in _MergeField
merger(tokenizer, message, field)
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\google\protobuf\text_format.py", line 1042, in _MergeMessageField
self._MergeField(tokenizer, sub_message)
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\google\protobuf\text_format.py", line 953, in _MergeField
tokenizer.Consume(':')
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\google\protobuf\text_format.py", line 1314, in Consume
raise self.ParseError('Expected "%s".' % token)
': Expected ":".text_format.ParseError: 2:4 : ' id=1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\ \Desktop\Vscode\Ticketing\Tecent_Captcha\models\research\object_detection\model_main_tf2.py", line 114, in
tf.compat.v1.app.run()
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\tensorflow\python\platform\app.py", line 36, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\absl\app.py", line 308, in run
_run_main(main, args)
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\absl\app.py", line 254, in _run_main
sys.exit(main(argv))
File "C:\Users\ \Desktop\Vscode\Ticketing\Tecent_Captcha\models\research\object_detection\model_main_tf2.py", line 105, in main
model_lib_v2.train_loop(
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\object_detection\model_lib_v2.py", line 563, in train_loop
train_input = strategy.experimental_distribute_datasets_from_function(
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\tensorflow\python\util\deprecation.py", line 357, in new_func
return func(*args, **kwargs)
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\tensorflow\python\distribute\distribute_lib.py", line 1198, in experimental_distribute_datasets_from_function
return self.distribute_datasets_from_function(dataset_fn, options)
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\tensorflow\python\distribute\distribute_lib.py", line 1189, in distribute_datasets_from_function
return self._extended._distribute_datasets_from_function( # pylint: disable=protected-access
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\tensorflow\python\distribute\mirrored_strategy.py", line 593, in _distribute_datasets_from_function
return input_util.get_distributed_datasets_from_function(
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\tensorflow\python\distribute\input_util.py", line 132, in get_distributed_datasets_from_function
return input_lib.DistributedDatasetsFromFunction(
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\tensorflow\python\distribute\input_lib.py", line 1372, in init
self.build()
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\tensorflow\python\distribute\input_lib.py", line 1393, in build
_create_datasets_from_function_with_input_context(
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\tensorflow\python\distribute\input_lib.py", line 1875, in _create_datasets_from_function_with_input_context
dataset = dataset_fn(ctx)
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\object_detection\model_lib_v2.py", line 554, in train_dataset_fn
train_input = inputs.train_input(
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\object_detection\inputs.py", line 908, in train_input
dataset = INPUT_BUILDER_UTIL_MAP['dataset_build'](
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\object_detection\builders\dataset_builder.py", line 209, in build
decoder = decoder_builder.build(input_reader_config)
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\object_detection\builders\decoder_builder.py", line 51, in build
decoder = tf_example_decoder.TfExampleDecoder(
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\object_detection\data_decoders\tf_example_decoder.py", line 458, in init
_ClassTensorHandler(
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\object_detection\data_decoders\tf_example_decoder.py", line 92, in init
name_to_id = label_map_util.get_label_map_dict(
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\object_detection\utils\label_map_util.py", line 211, in get_label_map_dict
label_map = load_labelmap(label_map_path_or_proto)
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\object_detection\utils\label_map_util.py", line 177, in load_labelmap
label_map.ParseFromString(label_map_string)
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\google\protobuf\message.py", line 199, in ParseFromString
return self.MergeFromString(serialized)
File "C:\Users\ .conda\envs\tf_tecent\lib\site-packages\google\protobuf\internal\python_message.py", line 1125, in MergeFromString
serialized = memoryview(serialized)
TypeError: memoryview: a bytes-like object is required, not 'str'
Does anyone know how to fix this?
- 主要语言
- Python
- 星标
- 77.6k
- 派生
- 44.8k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
tensorflow/models 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 72/100
tensorflow/models#13653 ·
-
object_detection_tutorial.ipynb pretrained model "resnet50 imagenet"可能重新可做 @laxmareddyp 于 202 天前认领,目前没有进行中的 PR。 未关闭type:support
tensorflow/models#13634 · 2 条评论 · 1 个 reaction · 已指派 1 人 ·
-
Tag version compatible with Tensorflow 2.20可能重新可做 @bharatjetti 于 277 天前认领,目前没有进行中的 PR。 未关闭models:official type:bug
tensorflow/models#13607 · 1 条评论 · 已指派 1 人 ·
-
models:research type:feature
难度 5/5 一周以上 新手友好度 10/100
tensorflow/models#13600 ·
-
Installation Issues on Python 3.13可能重新可做 @bharatjetti 于 246 天前认领,目前没有进行中的 PR。 未关闭models:official type:bug
tensorflow/models#13587 · 9 条评论 · 已指派 1 人 ·
查看 tensorflow/models 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
Project-N-E-K-O/N.E.K.O#3670 · 1 条评论 ·
维护者通常 1 天内回复
-
type:docs
难度 2/5 1-3 小时 新手友好度 82/100
jejjohnson/xtremax#123 ·
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
triage
难度 1/5 1 小时以内 新手友好度 78/100
microsoft/agent-framework#10218 ·
维护者通常 1 天内回复
-
fidelity
难度 2/5 半天 新手友好度 66/100
维护者通常 1 天内回复