您的位置:首页 > 其它

ImportError: No module named argparse 报错解决

2016-11-08 14:06 417 查看
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


本文固定链接: https://blog.dosec.org/archives/3306.html

转载请注明: dosec 2015年09月18日 于 DOSEC 'S BLOG 发表
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: