Codec problem with docker?

Hello,

When I tried to run a tutorial with edward on Docker, I got:

Traceback (most recent call last):            ETA: 72s | Loss: 623.688 
  File "bayesian_linear_regression.py", line 31, in <module>
    inference.run(n_samples=5, n_iter=250)
  File "/opt/conda/lib/python3.5/site-packages/edward/inferences/inference.py", line 145, in run
    self.print_progress(info_dict)
  File "/opt/conda/lib/python3.5/site-packages/edward/inferences/variational_inference.py", line 183, in print_progress
    self.progbar.update(t, {'Loss': info_dict['loss']})
  File "/opt/conda/lib/python3.5/site-packages/edward/util/progbar.py", line 85, in update
    sys.stdout.write(bar)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2588' in position 15: ordinal not in range(128)

Though this change solved it, is this a good solution?
Or, do I misunderstand?

1 Like

Nice catch! A pull request is very welcome.

Thank you for a reply.

I’m glad to create my very first pull request for OSS.

Now I noticed that “Dockerfile-gpu” exists.

Does Dockerfile-gpu need this line too?
I don’t have any GPU environment and can’t confirm it works.

I’ll fix this in the PR https://github.com/blei-lab/edward/pull/707.

Thank you very much.