Opened at 2021-09-07T19:27:09Z
Last modified at 2021-09-07T19:27:48Z
#3790 new defect
`tahoe status` explodes on an encoding issue in some environments
| Reported by: | exarkun | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | undecided |
| Component: | unknown | Version: | n/a |
| Keywords: | Cc: | ||
| Launchpad Bug: |
Description
If you have a recent operation on a client node then:
LANG=C tahoe status
explodes thusly:
Statistics (for last 37 seconds):
uploaded 3.31 MB in 1 files
downloaded 0 B in 0 files
No active operations.
Recent operations:
Traceback (most recent call last):
File "/nix/store/knrv5c2qzbxrr7f6hp5xj9zgcig36j3w-python-2.7.17/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/nix/store/knrv5c2qzbxrr7f6hp5xj9zgcig36j3w-python-2.7.17/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/exarkun/VirtualEnvs/tahoe-lafs/lib/python2.7/site-packages/twisted/_threads/_threadworker.py", line 46, in work
task()
File "/home/exarkun/VirtualEnvs/tahoe-lafs/lib/python2.7/site-packages/twisted/_threads/_team.py", line 190, in doWork
task()
--- <exception caught here> ---
File "/home/exarkun/VirtualEnvs/tahoe-lafs/lib/python2.7/site-packages/twisted/python/threadpool.py", line 250, in inContext
result = inContext.theWork()
File "/home/exarkun/VirtualEnvs/tahoe-lafs/lib/python2.7/site-packages/twisted/python/threadpool.py", line 266, in <lambda>
inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
File "/home/exarkun/VirtualEnvs/tahoe-lafs/lib/python2.7/site-packages/twisted/python/context.py", line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/home/exarkun/VirtualEnvs/tahoe-lafs/lib/python2.7/site-packages/twisted/python/context.py", line 85, in callWithContext
return func(*args,**kw)
File "/home/exarkun/Work/python/tahoe-lafs/src/allmydata/scripts/cli.py", line 595, in status
return tahoe_status.do_status(options)
File "/home/exarkun/Work/python/tahoe-lafs/src/allmydata/scripts/tahoe_status.py", line 296, in do_status
render_recent(options['verbose'], options.stdout, status_data)
File "/home/exarkun/Work/python/tahoe-lafs/src/allmydata/scripts/tahoe_status.py", line 239, in render_recent
print(header, file=stdout)
exceptions.UnicodeEncodeError: 'ascii' codec can't encode character u'\u2553' in position 0: ordinal not in range(128)
Note: See
TracTickets for help on using
tickets.

The test coverage for for tahoe status fakes tons of stuff, including stdout, so it can't catch this.