This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes

Bug 556973

Summary: virt-install --help crashes with non-english locales
Product: [Community] Virtualization Tools Reporter: Laurent Léonard <laurent>
Component: virtinstAssignee: Daniel Berrange <berrange>
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: crobinso
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-01 17:54:27 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Laurent Léonard 2010-01-19 18:53:35 EST
Description of problem:
virt-install --help crashes with non-english locales.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. LC_ALL=fr_BE.UTF-8 virt-install --help
Actual results:
trash@trash-laptop:~$ virt-install --help
show program's version number and exit   
show this help message and exit          
Se connecter à l'hyperviseur via l'URI   
Nom de l'instance de l'invité            
Mémoire à allouer à l'instance de l'invité en Mo
L'architecture de l'UC à simuler                
UUID for the guest.                             
Nombre d'UC virtuelles à configurer pour votre invité
Vérifier si il n'y a pas plus d'UC virtuelles que d'UC
physiques et prévenir si c'est le cas.                
Donner l'UC physique que le domaine peut utiliser     
Le type de SE pour les invités complètement           
virtualisés, par exemple ' linux ', ' unix ', '       
windows '                                             
The OS variant for fully virtualized guests, e.g.     
'fedora6', 'rhel5', 'solaris10', 'win2k'              
Add a serial device to the domain.                    
Add a parallel device to the domain.                  
Physical host device to attach to the domain.         
Use sound device emulation                            
Désactive l'APIC pour les invités complètement        
virtualisés (surcharge la valeur de la base de données
des os-type/os-variant)                               
Désactive l'APIC pour les invités complètement        
virtualisés (surcharge la valeur de la base de données
des os-type/os-variant)                               
Cet invité devrait être complètement virtualisé       
Cet invité devrait être paravirtualisé                
Hypervisor name to use (kvm, qemu, xen, ...)          
CD-ROM installation media                             
Installation source (eg, nfs:host:/path,              
http://host/path, ftp://host/path)                    
Boot from the network using the PXE protocol          
Build guest around an existing disk image             
Treat the CD-ROM media as a Live CD                   
Additional arguments to pass to the kernel booted from
Specify storage with various options. Ex.             
--disk path=/my/existing/disk                         
--disk path=/my/new/disk,size=5 (in gigabytes)        
--disk vol=poolname:volname,device=cdrom,bus=scsi,... 
Ne pas configurer de disque pour l'invité.            
Specify a network interface. Ex:                      
--network bridge=mybr0                                
--network network=my_libvirt_virtual_net              
--network network=mynet,model=virtio,mac=00:11...     
Don't create network interfaces for the guest.        
Utiliser VNC pour la prise en charge de l'interface   
Port à utiliser pour VNC                              
Address to listen on for VNC connections.             
set up keymap for the VNC console                     
Utiliser SDL pour la prise en charge de l'interface   
Ne pas configurer de console graphique pour l'invité. 
Specify video hardware type.                          
Ne pas essayer de se connecter automatiquement à la   
console de l'invité                                   
ERROR:root:'ascii' codec can't decode byte 0xc3 in position 29: ordinal not in range(128)
Traceback (most recent call last):                                                       
  File "/usr/bin/virt-install", line 943, in <module>                                    
  File "/usr/bin/virt-install", line 709, in main                                        
    options = parse_args()                                                               
  File "/usr/bin/virt-install", line 673, in parse_args                                  
    (options, dummy) = parser.parse_args()                                               
  File "/usr/lib/python2.5/", line 1387, in parse_args                        
    stop = self._process_args(largs, rargs, values)                                      
  File "/usr/lib/python2.5/", line 1427, in _process_args
    self._process_long_opt(rargs, values)
  File "/usr/lib/python2.5/", line 1502, in _process_long_opt
    option.process(opt, value, values, self)
  File "/usr/lib/python2.5/", line 774, in process
    self.action, self.dest, opt, value, values, parser)
  File "/usr/lib/python2.5/", line 796, in take_action
  File "/usr/lib/pymodules/python2.5/virtinst/", line 60, in print_help
    file.write(self.format_help().encode(encoding, "replace"))
  File "/usr/lib/python2.5/", line 1637, in format_help
  File "/usr/lib/python2.5/", line 1620, in format_option_help
  File "/usr/lib/python2.5/", line 1106, in format_help
    result += OptionContainer.format_help(self, formatter)
  File "/usr/lib/python2.5/", line 1077, in format_help
  File "/usr/lib/python2.5/", line 1067, in format_option_help
    return "".join(result)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 29: ordinal not in range(128)

Expected results:
A human readable help and no crash.
Comment 1 Cole Robinson 2010-03-01 17:54:27 EST
Okay, I think this is finally fixed upstream:
Comment 2 Laurent Léonard 2010-03-03 09:25:02 EST
It seems to work great now, thank you.