ImportError: No module named argparse 报错解决


Centos 6.5 x86_64 邮件里频繁报如下错误:

 

Additional info:
abrt_version:   2.0.8
cmdline:        /usr/bin/python /usr/libexec/abrt-action-generate-machine-id -o /var/spool/abrt/pyhook-2015-07-24-03:26:29-13226/machineid
executable:     /usr/libexec/abrt-action-generate-machine-id
hostname:       host
kernel:         2.6.32-504.30.3.el6.x86_64
last_occurrence: 1437722789
time:           Fri 24 Jul 2015 03:26:50 AM EDT
uid:            0

backtrace:
:abrt-action-generate-machine-id:24:<module>:ImportError: No module named argparse
:
:Traceback (most recent call last):
:  File "/usr/libexec/abrt-action-generate-machine-id", line 24, in <module>
:    from argparse import ArgumentParser
:ImportError: No module named argparse
:
:Local variables in innermost frame:
:__builtins__: <module '__builtin__' (built-in)>
:__file__: '/usr/libexec/abrt-action-generate-machine-id'
:__package__: None
:sys: <module 'sys' (built-in)>
:__name__: '__main__'
:__doc__: 'This module provides algorithms for generating Machine IDs.n'

 

经google 找到以下解决方案:

Please install that package:

 

# yum install python-argparse

and run the following command:
# /usr/libexec/abrt-action-generate-machine-id

to verify that the crash is fixed.

Please attach the result of the following command as well:
# cat /var/log/messages | grep abrt
原文地址:https://bugzilla.redhat.com/show_bug.cgi?id=1246539

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM