当前位置:网站首页>[Q&A]AttributeError: module ‘signal‘ has no attribute ‘SIGALRM‘
[Q&A]AttributeError: module ‘signal‘ has no attribute ‘SIGALRM‘
2022-07-07 12:34:00 【Sickle leek】
AttributeError: module 'signal' has no attribute 'SIGALRM'
Problem description :
When using spellpy When parsing log files , The following error occurred :
The code executed is :
for log_name in ['openstack_abnormal.log', 'openstack_normal2.log', 'openstack_normal1.log']:
parser.parse(log_name)
The error message is :
Traceback (most recent call last):
File "preprocess.py", line 62, in <module>
parser.parse(log_name)
File "D:\Anaconda\lib\site-packages\spellpy\spell.py", line 188, in parse
self.load_data()
File "D:\Anaconda\lib\site-packages\spellpy\spell.py", line 300, in load_data
self.df_log = self.log_to_dataframe(os.path.join(self.path, self.logname), regex, headers, self.logformat)
File "D:\Anaconda\lib\site-packages\spellpy\spell.py", line 316, in log_to_dataframe
signal.signal(signal.SIGALRM, self._log_to_dataframe_handler)
AttributeError: module 'signal' has no attribute 'SIGALRM'
Problem analysis
spell Called signal modular , This module can be used in linux Under normal use , But in windows But there are some restrictions :
“On Windows, signal() can only be called with SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, or SIGTERM. A ValueError will be raised in any other case.”
stay Windows Only these signal types are allowed to be used in the environment :
- SIGABRT
- SIGFPE
- SIGILL
- SIGINT
- SIGSEGV
- SIGTERM
边栏推荐
- Preorder, inorder and postorder traversal of binary tree
- SQL Lab (32~35) contains the principle understanding and precautions of wide byte injection (continuously updated later)
- Decrypt gd32 MCU product family, how to choose the development board?
- 即刻报名|飞桨黑客马拉松第三期盛夏登场,等你挑战
- ENSP MPLS layer 3 dedicated line
- 千人规模互联网公司研发效能成功之路
- Error in compiling libssl
- 编译 libssl 报错
- Static comprehensive experiment
- 爱可可AI前沿推介(7.7)
猜你喜欢
Processing strategy of message queue message loss and repeated message sending
leetcode刷题:二叉树21(验证二叉搜索树)
Airserver automatically receives multi screen projection or cross device projection
The left-hand side of an assignment expression may not be an optional property access. ts(2779)
Tutorial on principles and applications of database system (007) -- related concepts of database
Sort out the garbage collection of JVM, and don't involve high-quality things such as performance tuning for the time being
[statistical learning methods] learning notes - improvement methods
Several methods of checking JS to judge empty objects
【统计学习方法】学习笔记——逻辑斯谛回归和最大熵模型
Epp+dis learning path (1) -- Hello world!
随机推荐
On valuation model (II): PE index II - PE band
2022 8th "certification Cup" China University risk management and control ability challenge
平安证券手机行开户安全吗?
NGUI-UILabel
Session
What are the technical differences in source code anti disclosure
【统计学习方法】学习笔记——提升方法
数据库系统原理与应用教程(010)—— 概念模型与数据模型练习题
SQL lab 21~25 summary (subsequent continuous update) (including secondary injection explanation)
Sign up now | oar hacker marathon phase III midsummer debut, waiting for you to challenge
leetcode刷题:二叉树25(二叉搜索树的最近公共祖先)
leetcode刷题:二叉树24(二叉树的最近公共祖先)
Upgrade from a tool to a solution, and the new site with praise points to new value
Using stack to convert binary to decimal
千人规模互联网公司研发效能成功之路
开发一个小程序商城需要多少钱?
leetcode刷题:二叉树26(二叉搜索树中的插入操作)
解密GD32 MCU产品家族,开发板该怎么选?
盘点JS判断空对象的几大方法
leetcode刷题:二叉树27(删除二叉搜索树中的节点)