soupstar
soupstar

Reputation: 21

UnicodeDecodeError: 'utf-8' codec can't decode bytes 0x85 in position 34: invalid start byte

I am trying to train using the tensorflow models API. I get this error when i run :

python legacy/train.py --logtostderr
--train_dir=pack_detector/models/ssd_mobilenet_v1/train/ -- I am running this from tensorflow/models/research/object_detection

I am running on python3.7 and tensorflow 1.16

pipeline_config_path=pack_detector/models/ssd_mobilenet_v1/ssd_mobilenet_v1_pack.config Traceback (most recent call last): File "legacy/train.py", line 184, in tf.app.run() File "C:\Users\suparun\Anaconda3\envs\tensor\lib\site-packages\tensorflow\python\platform\app.py", line 40, in run _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef) File "C:\Users\suparun\Anaconda3\envs\tensor\lib\site-packages\absl\app.py", line 299, in run _run_main(main, args) File "C:\Users\suparun\Anaconda3\envs\tensor\lib\site-packages\absl\app.py", line 250, in _run_main sys.exit(main(argv)) File "C:\Users\suparun\Anaconda3\envs\tensor\lib\site-packages\tensorflow\python\util\deprecation.py", line 324, in new_func return func(*args, **kwargs) File "legacy/train.py", line 93, in main FLAGS.pipeline_config_path) File "C:\Users\suparun\Anaconda3\envs\tensor\lib\site-packages\object_detection\utils\config_util.py", line 95, in get_configs_from_pipeline_file proto_str = f.read() File "C:\Users\suparun\Anaconda3\envs\tensor\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 128, in read pywrap_tensorflow.ReadFromStream(self._read_buf, length)) File "C:\Users\suparun\Anaconda3\envs\tensor\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 98, in _prepare_value return compat.as_str_any(val) File "C:\Users\suparun\Anaconda3\envs\tensor\lib\site-packages\tensorflow\python\util\compat.py", line 117, in as_str_any return as_str(value) File "C:\Users\suparun\Anaconda3\envs\tensor\lib\site-packages\tensorflow\python\util\compat.py", line 87, in as_text return bytes_or_text.decode(encoding) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x85 in position 34: invalid start byte

Upvotes: 2

Views: 1103

Answers (2)

Mounesh
Mounesh

Reputation: 744

Instead of 'utf-8' use this codec : 'ISO-8859-1' (Do it specially if you have imported subprocess)

Upvotes: 0

savemightlife
savemightlife

Reputation: 129

0x85 is this character …

It is the character of 3 dots.

I just fixed it by replacing with an actual dots like this ...

But I replaced it using notepad++

I don't know how to replace it programatically.

Upvotes: 0

Related Questions