tensorflow / tensorflow/tensorboard

tensorboard crashes with "locale.Error: unsupported locale setting"

Open
#1,323 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.2k
Forks
1.7k
Avg merge
4d 22h
Merged PRs (30d)
1

Description

tensorboard 1.9.0
Mac OS High Sierra
Python 3.6.5

$ .venv/bin/tensorboard --logdir runs
Traceback (most recent call last):
  File ".venv/bin/tensorboard", line 11, in <module>
    sys.exit(run_main())
  File "/Users/mikesolomon/devel/pytorch-sandbox/.venv/lib/python3.6/site-packages/tensorboard/main.py", line 46, in run_main
    tf.app.run(main)
  File "/Users/mikesolomon/devel/pytorch-sandbox/.venv/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
    _sys.exit(main(argv))
  File "/Users/mikesolomon/devel/pytorch-sandbox/.venv/lib/python3.6/site-packages/tensorboard/main.py", line 55, in main
    default.get_assets_zip_provider())
  File "/Users/mikesolomon/devel/pytorch-sandbox/.venv/lib/python3.6/site-packages/tensorboard/program.py", line 167, in main
    util.setup_logging()
  File "/Users/mikesolomon/devel/pytorch-sandbox/.venv/lib/python3.6/site-packages/tensorboard/util.py", line 50, in setup_logging
    locale.setlocale(locale.LC_ALL, '')
  File "/Users/mikesolomon/devel/pytorch-sandbox/.venv/lib/python3.6/locale.py", line 598, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

commenting out util.setup_logging() makes it work like a charm, but this is kinda hacky.
Sorry that I can't contribute a fix, as I'm not exactly sure how the locale affects tensorboard and/or python.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported command on macOS and start with tensorboard/util.py at util.setup_logging(), where locale.setlocale(locale.LC_ALL, '') raises the exception. Determine how logging should behave when the system locale is unsupported, then verify that TensorBoard starts without the crash and that logging still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.