将 tensorflow 从 2.1.2 升级到 2.3.0 后,Tensorboard 无法使用
Posted
技术标签:
【中文标题】将 tensorflow 从 2.1.2 升级到 2.3.0 后,Tensorboard 无法使用【英文标题】:Tensorboard not working with after upgrading tensorflow from 2.1.2 to 2.3.0 【发布时间】:2021-05-19 01:43:00 【问题描述】:我使用的是 TensorFlow 2.1.2 和 TensorBoard 2.4.1,
import os, shutil
import tensorflow as tf
print(tf.__version__)
SUMMARY_DIR = 'summary/testing_this'
if 1:
# SUMMARY_DIR is the path of the directory where the tensorboard SummaryWriter files are written
# the directory is removed, if it already exists
if os.path.exists(SUMMARY_DIR):
shutil.rmtree(SUMMARY_DIR)
train_summary_writer = tf.summary.create_file_writer(os.path.join(SUMMARY_DIR, 'train'))
test_summary_writer = tf.summary.create_file_writer(os.path.join(SUMMARY_DIR, 'test'))
train_summary_counter = 0
for i in range(100):
with train_summary_writer.as_default():
tf.summary.scalar('train/sampled-softmax loss', i+5, step=train_summary_counter)
train_summary_counter += 1
上面编写的代码运行良好。但是当我升级到 TensorFlow 2.3.0 时,抛出了以下错误-
Serving TensorBoard on localhost; to expose to the network, use a proxy or pass --bind_all
TensorBoard 2.4.1 at http://localhost:6006/ (Press CTRL+C to quit)
E0216 07:39:53.581997 140588167055104 _internal.py:113] Error on request:
Traceback (most recent call last):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 124, in read_chunk_len
_len = int(line.strip(), 16)
ValueError: invalid literal for int() with base 16: '------WebKitFormBoundary20rNOiiimzABSId3'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 131, in wrapper
return f(self, stream, *args, **kwargs)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 253, in _parse_multipart
form, files = parser.parse(stream, boundary, content_length)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 584, in parse
return self.cls(form), self.cls(files)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/datastructures.py", line 419, in __init__
for key, value in mapping or ():
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 582, in <genexpr>
form = (p[1] for p in formstream if p[0] == "form")
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 537, in parse_parts
for ellt, ell in self.parse_lines(file, boundary, content_length):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 451, in parse_lines
terminator = self._find_terminator(iterator)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 368, in _find_terminator
for line in iterator:
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wsgi.py", line 721, in make_line_iter
first_item = next(_iter, "")
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wsgi.py", line 681, in _make_chunk_iter
item = _read(buffer_size)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 137, in readinto
self._len = self.read_chunk_len()
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 126, in read_chunk_len
raise IOError("Invalid chunk header")
OSError: Invalid chunk header
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 124, in read_chunk_len
_len = int(line.strip(), 16)
ValueError: invalid literal for int() with base 16: 'Content-Disposition: form-data; name="tag"'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 323, in run_wsgi
execute(self.server.app)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 312, in execute
application_iter = app(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/application.py", line 526, in __call__
return self._app(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/application.py", line 567, in wrapper
return wsgi_app(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/security_validator.py", line 80, in __call__
return self._application(environ, start_response_proxy)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/path_prefix.py", line 71, in __call__
return self._application(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/experiment_id.py", line 76, in __call__
return self._application(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/empty_path_redirect.py", line 47, in __call__
return self._application(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/application.py", line 590, in wrapper
return wsgi_app(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/application.py", line 549, in _route_request
return self.exact_routes[clean_path](environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wrappers/base_request.py", line 238, in application
resp = f(*args[:-2] + (request,))
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/plugins/scalar/scalars_plugin.py", line 166, in scalars_multirun_route
tags = request.form.getlist("tag")
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/utils.py", line 90, in __get__
value = self.func(obj)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wrappers/base_request.py", line 480, in form
self._load_form_data()
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wrappers/base_request.py", line 319, in _load_form_data
self._get_stream_for_parsing(), mimetype, content_length, options
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 232, in parse
return parse_func(self, stream, mimetype, content_length, options)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 138, in wrapper
chunk = stream.read(1024 * 64)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 137, in readinto
self._len = self.read_chunk_len()
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 126, in read_chunk_len
raise IOError("Invalid chunk header")
OSError: Invalid chunk header
E0216 07:39:53.585781 140588158662400 _internal.py:113] Error on request:
Traceback (most recent call last):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 124, in read_chunk_len
_len = int(line.strip(), 16)
ValueError: invalid literal for int() with base 16: '------WebKitFormBoundary4NW6Hm666U0prn4r'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 131, in wrapper
return f(self, stream, *args, **kwargs)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 253, in _parse_multipart
form, files = parser.parse(stream, boundary, content_length)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 584, in parse
return self.cls(form), self.cls(files)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/datastructures.py", line 419, in __init__
for key, value in mapping or ():
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 582, in <genexpr>
form = (p[1] for p in formstream if p[0] == "form")
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 537, in parse_parts
for ellt, ell in self.parse_lines(file, boundary, content_length):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 451, in parse_lines
terminator = self._find_terminator(iterator)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 368, in _find_terminator
for line in iterator:
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wsgi.py", line 721, in make_line_iter
first_item = next(_iter, "")
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wsgi.py", line 681, in _make_chunk_iter
item = _read(buffer_size)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 137, in readinto
self._len = self.read_chunk_len()
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 126, in read_chunk_len
raise IOError("Invalid chunk header")
OSError: Invalid chunk header
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 124, in read_chunk_len
_len = int(line.strip(), 16)
ValueError: invalid literal for int() with base 16: 'Content-Disposition: form-data; name="tag"'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 323, in run_wsgi
execute(self.server.app)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 312, in execute
application_iter = app(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/application.py", line 526, in __call__
return self._app(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/application.py", line 567, in wrapper
return wsgi_app(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/security_validator.py", line 80, in __call__
return self._application(environ, start_response_proxy)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/path_prefix.py", line 71, in __call__
return self._application(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/experiment_id.py", line 76, in __call__
return self._application(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/empty_path_redirect.py", line 47, in __call__
return self._application(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/application.py", line 590, in wrapper
return wsgi_app(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/application.py", line 549, in _route_request
return self.exact_routes[clean_path](environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wrappers/base_request.py", line 238, in application
resp = f(*args[:-2] + (request,))
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/plugins/scalar/scalars_plugin.py", line 166, in scalars_multirun_route
tags = request.form.getlist("tag")
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/utils.py", line 90, in __get__
value = self.func(obj)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wrappers/base_request.py", line 480, in form
self._load_form_data()
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wrappers/base_request.py", line 319, in _load_form_data
self._get_stream_for_parsing(), mimetype, content_length, options
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 232, in parse
return parse_func(self, stream, mimetype, content_length, options)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 138, in wrapper
chunk = stream.read(1024 * 64)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 137, in readinto
self._len = self.read_chunk_len()
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 126, in read_chunk_len
raise IOError("Invalid chunk header")
OSError: Invalid chunk header
E0216 07:39:53.721650 140588158662400 _internal.py:113] Error on request:
Traceback (most recent call last):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 124, in read_chunk_len
_len = int(line.strip(), 16)
ValueError: invalid literal for int() with base 16: '------WebKitFormBoundaryQo6LrfWENvCGlGD7'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 131, in wrapper
return f(self, stream, *args, **kwargs)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 253, in _parse_multipart
form, files = parser.parse(stream, boundary, content_length)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 584, in parse
return self.cls(form), self.cls(files)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/datastructures.py", line 419, in __init__
for key, value in mapping or ():
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 582, in <genexpr>
form = (p[1] for p in formstream if p[0] == "form")
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 537, in parse_parts
for ellt, ell in self.parse_lines(file, boundary, content_length):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 451, in parse_lines
terminator = self._find_terminator(iterator)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 368, in _find_terminator
for line in iterator:
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wsgi.py", line 721, in make_line_iter
first_item = next(_iter, "")
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wsgi.py", line 681, in _make_chunk_iter
item = _read(buffer_size)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 137, in readinto
self._len = self.read_chunk_len()
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 126, in read_chunk_len
raise IOError("Invalid chunk header")
OSError: Invalid chunk header
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 124, in read_chunk_len
_len = int(line.strip(), 16)
ValueError: invalid literal for int() with base 16: 'Content-Disposition: form-data; name="tag"'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 323, in run_wsgi
execute(self.server.app)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 312, in execute
application_iter = app(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/application.py", line 526, in __call__
return self._app(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/application.py", line 567, in wrapper
return wsgi_app(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/security_validator.py", line 80, in __call__
return self._application(environ, start_response_proxy)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/path_prefix.py", line 71, in __call__
return self._application(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/experiment_id.py", line 76, in __call__
return self._application(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/empty_path_redirect.py", line 47, in __call__
return self._application(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/application.py", line 590, in wrapper
return wsgi_app(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/application.py", line 549, in _route_request
return self.exact_routes[clean_path](environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wrappers/base_request.py", line 238, in application
resp = f(*args[:-2] + (request,))
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/plugins/scalar/scalars_plugin.py", line 166, in scalars_multirun_route
tags = request.form.getlist("tag")
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/utils.py", line 90, in __get__
value = self.func(obj)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wrappers/base_request.py", line 480, in form
self._load_form_data()
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wrappers/base_request.py", line 319, in _load_form_data
self._get_stream_for_parsing(), mimetype, content_length, options
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 232, in parse
return parse_func(self, stream, mimetype, content_length, options)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 138, in wrapper
chunk = stream.read(1024 * 64)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 137, in readinto
self._len = self.read_chunk_len()
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 126, in read_chunk_len
raise IOError("Invalid chunk header")
OSError: Invalid chunk header
E0216 07:39:53.824328 140588158662400 _internal.py:113] Error on request:
Traceback (most recent call last):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 124, in read_chunk_len
_len = int(line.strip(), 16)
ValueError: invalid literal for int() with base 16: '------WebKitFormBoundaryPDuqOCLNbMBFkkSo'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 131, in wrapper
return f(self, stream, *args, **kwargs)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 253, in _parse_multipart
form, files = parser.parse(stream, boundary, content_length)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 584, in parse
return self.cls(form), self.cls(files)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/datastructures.py", line 419, in __init__
for key, value in mapping or ():
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 582, in <genexpr>
form = (p[1] for p in formstream if p[0] == "form")
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 537, in parse_parts
for ellt, ell in self.parse_lines(file, boundary, content_length):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 451, in parse_lines
terminator = self._find_terminator(iterator)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 368, in _find_terminator
for line in iterator:
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wsgi.py", line 721, in make_line_iter
first_item = next(_iter, "")
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wsgi.py", line 681, in _make_chunk_iter
item = _read(buffer_size)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 137, in readinto
self._len = self.read_chunk_len()
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 126, in read_chunk_len
raise IOError("Invalid chunk header")
OSError: Invalid chunk header
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 124, in read_chunk_len
_len = int(line.strip(), 16)
ValueError: invalid literal for int() with base 16: 'Content-Disposition: form-data; name="tag"'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 323, in run_wsgi
execute(self.server.app)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 312, in execute
application_iter = app(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/application.py", line 526, in __call__
return self._app(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/application.py", line 567, in wrapper
return wsgi_app(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/security_validator.py", line 80, in __call__
return self._application(environ, start_response_proxy)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/path_prefix.py", line 71, in __call__
return self._application(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/experiment_id.py", line 76, in __call__
return self._application(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/empty_path_redirect.py", line 47, in __call__
return self._application(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/application.py", line 590, in wrapper
return wsgi_app(environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/backend/application.py", line 549, in _route_request
return self.exact_routes[clean_path](environ, start_response)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wrappers/base_request.py", line 238, in application
resp = f(*args[:-2] + (request,))
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/tensorboard/plugins/scalar/scalars_plugin.py", line 166, in scalars_multirun_route
tags = request.form.getlist("tag")
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/utils.py", line 90, in __get__
value = self.func(obj)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wrappers/base_request.py", line 480, in form
self._load_form_data()
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/wrappers/base_request.py", line 319, in _load_form_data
self._get_stream_for_parsing(), mimetype, content_length, options
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 232, in parse
return parse_func(self, stream, mimetype, content_length, options)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/formparser.py", line 138, in wrapper
chunk = stream.read(1024 * 64)
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 137, in readinto
self._len = self.read_chunk_len()
File "/home/ec2-user/anaconda3/envs/tensorflow2_p36/lib/python3.6/site-packages/werkzeug/serving.py", line 126, in read_chunk_len
raise IOError("Invalid chunk header")
OSError: Invalid chunk header
有人可以帮我用 tf 2.3.0 运行 tensorboard 吗?
【问题讨论】:
【参考方案1】:使用pip install 'tensorboard<2.4'
降级为我解决了这个问题。
似乎 tensorboard 2.4 做出了一些重大改变。
【讨论】:
可能与github.com/chaoleili/jupyterlab_tensorboard/issues/25有关以上是关于将 tensorflow 从 2.1.2 升级到 2.3.0 后,Tensorboard 无法使用的主要内容,如果未能解决你的问题,请参考以下文章
基于CentOS7环境的Python从3.6升级到3.8及部署Tensorflow2的过程笔记
将 nvidia 驱动程序从 384.90 升级到 384.111 后出现 CUDA/cuDNN 错误