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