当前位置:网站首页>[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
边栏推荐
- RHSA first day operation
- How to understand the clothing industry chain and supply chain
- SQL lab 21~25 summary (subsequent continuous update) (including secondary injection explanation)
- Several methods of checking JS to judge empty objects
- The hoisting of the upper cylinder of the steel containment of the world's first reactor "linglong-1" reactor building was successful
- Zhimei creative website exercise
- 【统计学习方法】学习笔记——支持向量机(下)
- sql-lab (54-65)
- SQL Lab (36~40) includes stack injection, MySQL_ real_ escape_ The difference between string and addslashes (continuous update after)
- Attack and defense world ----- summary of web knowledge points
猜你喜欢
2022 8th "certification Cup" China University risk management and control ability challenge
ENSP MPLS layer 3 dedicated line
The left-hand side of an assignment expression may not be an optional property access.ts(2779)
OSPF exercise Report
leetcode刷题:二叉树25(二叉搜索树的最近公共祖先)
leetcode刷题:二叉树22(二叉搜索树的最小绝对差)
Financial data acquisition (III) when a crawler encounters a web page that needs to scroll with the mouse wheel to refresh the data (nanny level tutorial)
idm服务器响应显示您没有权限下载解决教程
wallys/Qualcomm IPQ8072A networking SBC supports dual 10GbE, WiFi 6
Hi3516 full system type burning tutorial
随机推荐
【统计学习方法】学习笔记——支持向量机(上)
静态Vxlan 配置
H3C HCl MPLS layer 2 dedicated line experiment
Cookie
(to be deleted later) yyds, paid academic resources, please keep a low profile!
【玩转 RT-Thread】 RT-Thread Studio —— 按键控制电机正反转、蜂鸣器
NGUI-UILabel
How much does it cost to develop a small program mall?
平安证券手机行开户安全吗?
SQL Lab (32~35) contains the principle understanding and precautions of wide byte injection (continuously updated later)
What are the technical differences in source code anti disclosure
解决 Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually
Configure an encrypted web server
【统计学习方法】学习笔记——支持向量机(下)
Is it safe to open Huatai's account in kainiu in 2022?
What is a LAN domain name? How to parse?
【二叉树】删点成林
Completion report of communication software development and Application
Pule frog small 5D movie equipment | 5D movie dynamic movie experience hall | VR scenic area cinema equipment
全球首堆“玲龙一号”反应堆厂房钢制安全壳上部筒体吊装成功