当前位置:网站首页>[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
边栏推荐
- [pytorch practice] image description -- let neural network read pictures and tell stories
- 浅谈估值模型 (二): PE指标II——PE Band
- Static comprehensive experiment
- 【PyTorch实战】图像描述——让神经网络看图讲故事
- What are the technical differences in source code anti disclosure
- Static vxlan configuration
- @What happens if bean and @component are used on the same class?
- An error occurred when vscade tried to create a file in the target directory: access denied [resolved]
- 【PyTorch实战】用PyTorch实现基于神经网络的图像风格迁移
- SQL lab 21~25 summary (subsequent continuous update) (including secondary injection explanation)
猜你喜欢
金融数据获取(三)当爬虫遇上要鼠标滚轮滚动才会刷新数据的网页(保姆级教程)
Processing strategy of message queue message loss and repeated message sending
Visual studio 2019 (localdb) \mssqllocaldb SQL Server 2014 database version is 852 and cannot be opened. This server supports version 782 and earlier
[play RT thread] RT thread Studio - key control motor forward and reverse rotation, buzzer
解决 Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually
对话PPIO联合创始人王闻宇:整合边缘算力资源,开拓更多音视频服务场景
leetcode刷题:二叉树21(验证二叉搜索树)
The hoisting of the upper cylinder of the steel containment of the world's first reactor "linglong-1" reactor building was successful
Static comprehensive experiment
The IDM server response shows that you do not have permission to download the solution tutorial
随机推荐
Preorder, inorder and postorder traversal of binary tree
(to be deleted later) yyds, paid academic resources, please keep a low profile!
Session
Zhimei creative website exercise
JS to convert array to tree data
Is it safe to open Huatai's account in kainiu in 2022?
The road to success in R & D efficiency of 1000 person Internet companies
数据库系统原理与应用教程(008)—— 数据库相关概念练习题
Attack and defense world ----- summary of web knowledge points
leetcode刷题:二叉树22(二叉搜索树的最小绝对差)
Customize the web service configuration file
Dialogue with Wang Wenyu, co-founder of ppio: integrate edge computing resources and explore more audio and video service scenarios
What is a LAN domain name? How to parse?
Completion report of communication software development and Application
Decrypt gd32 MCU product family, how to choose the development board?
SQL Lab (41~45) (continuous update later)
SQL Lab (46~53) (continuous update later) order by injection
Configure an encrypted web server
2022A特种设备相关管理(锅炉压力容器压力管道)模拟考试题库模拟考试平台操作
Cenos openssh upgrade to version 8.4