Blank Page in Browser (and other error)
See original GitHub issueWhen starting tensorboard I only get a blank white page. Tested on multiple browsers and scripts. I just updated to the new Tensorflow 2.0, yesterday with the older version it worked. If I mark the page it just shows 4 blue vertical lines. Inspecting the web page with chrome shows a lot of html code. Using VSCode, Win10 Chrome and Firefox.
I start tensorboard with any of these: tensorboard --logdir ./logs tensorboard --logdir ./logs --bind_all tensorboard --logdir ./logs --host localhost --port 8080
Results are the same.
strange other error
Also I get a strange error now with the new version if I take the official example and create the log_dir in the following way:
log_dir="logs/fit/" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
It raises the error “tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: logs/fit/20200107-131107\train; No such file or directory [Op:CreateSummaryFileWriter]”
So I have to use os.path.join
or just take no subdirectories.
Example file to reconstruct error
from datetime import datetime
import tensorflow as tf
mnist = tf.keras.datasets.mnist
(x_train, y_train),(x_test, y_test) = mnist.load_data()
def create_model():
return tf.keras.models.Sequential([
tf.keras.layers.Flatten(input_shape=(28, 28)),
tf.keras.layers.Dense(512, activation='relu'),
tf.keras.layers.Dropout(0.2),
tf.keras.layers.Dense(10, activation='softmax')
])
model = create_model()
model.compile(optimizer='adam',
loss='sparse_categorical_crossentropy',
metrics=['accuracy'])
log_dir= datetime.now().strftime("%Y%m%d-%H%M%S")
tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir=log_dir, histogram_freq=1)
model.fit(x=x_train,
y=y_train,
epochs=1,
validation_data=(x_test, y_test),
callbacks=[tensorboard_callback])
Diagnostics
Diagnostics output
--- check: autoidentify
INFO: diagnose_tensorboard.py version d515ab103e2b1cfcea2b096187741a0eeb8822ef
--- check: general
INFO: sys.version_info: sys.version_info(major=3, minor=6, micro=7, releaselevel='final', serial=0)
INFO: os.name: nt
INFO: os.uname(): N/A
INFO: sys.getwindowsversion(): sys.getwindowsversion(major=10, minor=0, build=17763, platform=2, service_pack='')
--- check: package_management
INFO: has conda-meta: False
INFO: $VIRTUAL_ENV: None
--- check: installed_packages
INFO: installed: tensorboard==2.1.0
INFO: installed: tensorflow==2.0.0
INFO: installed: tensorflow-estimator==2.0.1
--- check: tensorboard_python_version
INFO: tensorboard.version.VERSION: '2.1.0'
--- check: tensorflow_python_version
INFO: tensorflow.__version__: '2.0.0'
INFO: tensorflow.__git_version__: 'v2.0.0-rc2-26-g64c3d382ca'
--- check: tensorboard_binary_path
INFO: which tensorboard: b'C:\\Python3\\Scripts\\tensorboard.exe\r\n'
--- check: addrinfos
socket.has_ipv6 = True
socket.AF_UNSPEC = <AddressFamily.AF_UNSPEC: 0>
socket.SOCK_STREAM = <SocketKind.SOCK_STREAM: 1>
socket.AI_ADDRCONFIG = <AddressInfo.AI_ADDRCONFIG: 1024>
socket.AI_PASSIVE = <AddressInfo.AI_PASSIVE: 1>
Loopback flags: <AddressInfo.AI_ADDRCONFIG: 1024>
Loopback infos: [(<AddressFamily.AF_INET6: 23>, <SocketKind.SOCK_STREAM: 1>, 0, '', ('::1', 0, 0, 0)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 0, '', ('127.0.0.1', 0))]
Wildcard flags: <AddressInfo.AI_PASSIVE: 1>
Wildcard infos: [(<AddressFamily.AF_INET6: 23>, <SocketKind.SOCK_STREAM: 1>, 0, '', ('::', 0, 0, 0)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 0, '', ('0.0.0.0', 0))]
--- check: readable_fqdn
INFO: socket.getfqdn(): 'dnpc.ddns.lcl'
--- check: stat_tensorboardinfo
INFO: directory: C:\Users\Public\Documents\Wondershare\CreatorTemp\.tensorboard-info
INFO: os.stat(...): os.stat_result(st_mode=16895, st_ino=3096224744537609, st_dev=1926005927, st_nlink=1, st_uid=0, st_gid=0, st_size=0, st_atime=1578399251, st_mtime=1578399251, st_ctime=1578397643)
INFO: mode: 0o40777
--- check: source_trees_without_genfiles
INFO: tensorboard_roots (1): ['C:\\Python3\\lib\\site-packages']; bad_roots (0): []
--- check: full_pip_freeze
INFO: pip freeze --all:
absl-py==0.7.0
astor==0.7.1
attrs==19.1.0
backcall==0.1.0
bayespy==0.5.18
bleach==3.1.0
cachetools==4.0.0
certifi==2019.3.9
chardet==3.0.4
click==7.0
clickclick==1.2.2
colorama==0.4.1
connexion==1.1.15
cycler==0.10.0
Cython==0.29.11
decorator==4.3.2
defusedxml==0.5.0
dlib==19.17.0
entrypoints==0.3
flask==1.0.3
gast==0.2.2
gmplot==1.2.0
google-auth==1.10.0
google-auth-oauthlib==0.4.1
google-pasta==0.1.8
gpx-parser==0.0.4
grpcio==1.26.0
h5py==2.9.0
idna==2.8
imageio==2.5.0
importlib==1.0.4
inflection==0.3.1
ipykernel==5.1.0
ipython==7.3.0
ipython-genutils==0.2.0
ipywidgets==7.4.2
itsdangerous==1.1.0
jedi==0.13.3
Jinja2==2.10
joblib==0.13.2
jsonschema==3.0.1
jupyter==1.0.0
jupyter-client==5.2.4
jupyter-console==6.0.0
jupyter-core==4.4.0
Keras-Applications==1.0.8
Keras-Preprocessing==1.0.8
kiwisolver==1.0.1
Markdown==3.0.1
MarkupSafe==1.1.1
matplotlib==3.0.2
mistune==0.8.4
nbconvert==5.4.1
nbformat==4.4.0
networkx==2.2
notebook==5.7.4
numpy==1.16.1
oauthlib==3.1.0
openapi-spec-validator==0.2.7
opt-einsum==3.1.0
pandas==0.24.1
pandocfilters==1.4.2
parso==0.3.4
pickleshare==0.7.5
Pillow==6.0.0
pip==19.2.3
primo==1.0
prometheus-client==0.6.0
prompt-toolkit==2.0.9
protobuf==3.6.1
pyasn1==0.4.8
pyasn1-modules==0.2.7
Pygments==2.3.1
pykalman==0.9.5
pyparsing==2.3.1
PyQt5==5.12.1
PyQt5-sip==4.19.15
pyrsistent==0.14.11
python-dateutil==2.6.0
pytz==2018.9
pywinpty==0.5.5
pyyaml==5.1
pyzmq==18.0.1
qtconsole==4.4.3
requests==2.21.0
requests-oauthlib==1.3.0
rsa==4.0
scikit-learn==0.21.2
scipy==1.3.3
seaborn==0.9.0
Send2Trash==1.5.0
setuptools==44.0.0
six==1.12.0
sklearn==0.0
swagger-server==1.0.0
swagger-spec-validator==2.4.3
tensorboard==2.1.0
tensorflow==2.0.0
tensorflow-estimator==2.0.1
termcolor==1.1.0
terminado==0.8.1
testpath==0.4.2
tornado==6.0.1
traitlets==4.3.2
typing==3.6.2
urllib3==1.24.3
wcwidth==0.1.7
webencodings==0.5.1
Werkzeug==0.14.1
wheel==0.32.3
widgetsnbextension==3.4.2
wrapt==1.11.2
Next steps
No action items identified. Please copy ALL of the above output, including the lines containing only backticks, into your GitHub issue or comment. Be sure to redact any sensitive information.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:16
- Comments:34 (10 by maintainers)
Top GitHub Comments
Reporting that I have the same error in the browser. Tensorflow 2.0.0, tensorboard 2.1.0, tested in both firefox and chrome on windows 10. The installation is fresh from yesterday. Errors:
The error was fixed by switching back to tensorboard 2.0.0.
I have a 10 days old windows instalation and this problem was plaguing me already, so I developed a temporary workaround for people coming here from searching all over the internet that doesn’t involve changing registry (which usually is a better solution, except on my case):
First, check if you have the problem by running cmd.exe and executing the following:
A correct output would be
['application/javascript', None]
, if you don’t see that, proceed to fix:mimetypes
is usually found atC:\python38\Lib\mimetypes.py
, there’s a methodguess_type
at line 97 (may change depending on your version)After the comment, add these lines at the start of the function (lines 116 and 117):
Then, run the console command again to check if it worked (it should print correctly).
Note: If you have tensorboard running while you fix it, you’ll need to restart the process (
tensorboard.exe
) to clear its cache.This was enough for me to transform the 100% blank page to a fully functional page from tensorboard.