当前位置:网站首页>[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
边栏推荐
- 开发一个小程序商城需要多少钱?
- Minimalist movie website
- 数据库系统原理与应用教程(007)—— 数据库相关概念
- Tutorial on principles and applications of database system (010) -- exercises of conceptual model and data model
- leetcode刷题:二叉树24(二叉树的最近公共祖先)
- Learning and using vscode
- What are the top-level domain names? How is it classified?
- 111. Network security penetration test - [privilege escalation 9] - [windows 2008 R2 kernel overflow privilege escalation]
- 数据库系统原理与应用教程(010)—— 概念模型与数据模型练习题
- How to understand the clothing industry chain and supply chain
猜你喜欢

ENSP MPLS layer 3 dedicated line

【PyTorch实战】图像描述——让神经网络看图讲故事

Several methods of checking JS to judge empty objects

Airserver automatically receives multi screen projection or cross device projection

SQL Lab (46~53) (continuous update later) order by injection

Minimalist movie website

The left-hand side of an assignment expression may not be an optional property access. ts(2779)

@What happens if bean and @component are used on the same class?

Vxlan 静态集中网关

Pule frog small 5D movie equipment | 5D movie dynamic movie experience hall | VR scenic area cinema equipment
随机推荐
SQL injection -- Audit of PHP source code (take SQL lab 1~15 as an example) (super detailed)
Routing strategy of multi-point republication [Huawei]
Vxlan static centralized gateway
leetcode刷题:二叉树27(删除二叉搜索树中的节点)
EPP+DIS学习之路(1)——Hello world!
<No. 9> 1805. Number of different integers in the string (simple)
111. Network security penetration test - [privilege escalation 9] - [windows 2008 R2 kernel overflow privilege escalation]
爱可可AI前沿推介(7.7)
Tutorial on principles and applications of database system (010) -- exercises of conceptual model and data model
Realize all, race, allsettled and any of the simple version of promise by yourself
解决 Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually
IPv6 experiment
SQL Lab (46~53) (continuous update later) order by injection
About sqli lab less-15 using or instead of and parsing
【PyTorch实战】图像描述——让神经网络看图讲故事
Customize the web service configuration file
即刻报名|飞桨黑客马拉松第三期盛夏登场,等你挑战
Using stack to convert binary to decimal
On valuation model (II): PE index II - PE band
Niuke website