tensorboard: OSError: [Errno 22] Invalid argument

When I updated tensorboard from 1.12 to 1.13.1(because of svg export problem) and updated numpy to 1.16.2, I found my tensorboard didn’s work. I reinstalled tensorflow and tensorboard but it still didn’t work. My system: Win7, python version:3.6.5(in Anaconda3). Error code:

$ tensorboard --logdir=.
TensorBoard 1.13.1 at http://Myname:6006 (Press CTRL+C to quit)
Traceback (most recent call last):
  File "f:\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "f:\anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "F:\Anaconda3\Scripts\tensorboard.exe\__main__.py", line 9, in <module>
  File "f:\anaconda3\lib\site-packages\tensorboard\main.py", line 57, in run_main
    app.run(tensorboard.main, flags_parser=tensorboard.configure)
  File "f:\anaconda3\lib\site-packages\absl\app.py", line 300, in run
    _run_main(main, args)
  File "f:\anaconda3\lib\site-packages\absl\app.py", line 251, in _run_main
    sys.exit(main(argv))
  File "f:\anaconda3\lib\site-packages\tensorboard\program.py", line 228, in main
    self._register_info(server)
  File "f:\anaconda3\lib\site-packages\tensorboard\program.py", line 274, in _register_info
    manager.write_info_file(info)
  File "f:\anaconda3\lib\site-packages\tensorboard\manager.py", line 269, in write_info_file
    payload = "%s\n" % _info_to_string(tensorboard_info)
  File "f:\anaconda3\lib\site-packages\tensorboard\manager.py", line 129, in _info_to_string
    for k in _TENSORBOARD_INFO_FIELDS
  File "f:\anaconda3\lib\site-packages\tensorboard\manager.py", line 129, in <dictcomp>
    for k in _TENSORBOARD_INFO_FIELDS
  File "f:\anaconda3\lib\site-packages\tensorboard\manager.py", line 51, in <lambda>
    (dt - datetime.datetime.fromtimestamp(0)).total_seconds()),
OSError: [Errno 22] Invalid argument

Does anyone have same issue or any idea how to solve it?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 19 (8 by maintainers)

Most upvoted comments

@deva-gopalani: pip install tensorboard==1.12.2

Given the number of people who have commented in this thread, I do think that we should release a patch release of TensorBoard to work around the bug in early versions of Python 3.6. Tracking this in #2017.

I rollbacked tensorboard to 1.12 version, and it worked again. I think this may be a bug in the latest version

Hi @IamWangYunKai! Thanks for the report. This is Python bug #29097, which was introduced in Python 3.6, and which I believe has been fixed as of Python 3.6.7 via 6ea8a3a0ebf840ca57b6dba9cad26fbb0ddaa5d4.

Could you please upgrading to Python≥3.6.7 and TensorBoard 1.13.1, and let us know whether this resolves the issue for you?

TensorBoard 1.14.0 was released with the fix, and should work even on old (broken) versions of Python. 👍