当前位置:网站首页>[Q&A]AttributeError: module ‘signal‘ has no attribute ‘SIGALRM‘
[Q&A]AttributeError: module ‘signal‘ has no attribute ‘SIGALRM‘
2022-07-07 10:28:00 【镰刀韭菜】
问题描述:
当使用spellpy对日志文件进行解析时,出现如下错误:
执行的代码为:
for log_name in ['openstack_abnormal.log', 'openstack_normal2.log', 'openstack_normal1.log']:
parser.parse(log_name)
错误信息为:
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'
问题分析
spell调用了signal模块,该模块可以在linux下正常使用,但在windows下却有一些限制:
“On Windows, signal() can only be called with SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, or SIGTERM. A ValueError will be raised in any other case.”
在Windows环境下只有这个几个信号类型允许被使用:
- SIGABRT
- SIGFPE
- SIGILL
- SIGINT
- SIGSEGV
- SIGTERM
边栏推荐
- Learning and using vscode
- @Bean与@Component用在同一个类上,会怎么样?
- 关于 Web Content-Security-Policy Directive 通过 meta 元素指定的一些测试用例
- Tutorial on the principle and application of database system (008) -- exercises on database related concepts
- 利用棧來實現二進制轉化為十進制
- Will the filing free server affect the ranking and weight of the website?
- Unity 贴图自动匹配材质工具 贴图自动添加到材质球工具 材质球匹配贴图工具 Substance Painter制作的贴图自动匹配材质球工具
- The hoisting of the upper cylinder of the steel containment of the world's first reactor "linglong-1" reactor building was successful
- Basic introduction to the 16 tabs tab control in the fleet tutorial (the tutorial includes source code)
- How to connect 5V serial port to 3.3V MCU serial port?
猜你喜欢

OSPF exercise Report

MATLAB實現Huffman編碼譯碼含GUI界面

In the small skin panel, use CMD to enter the MySQL command, including the MySQL error unknown variable 'secure_ file_ Priv 'solution (super detailed)

Unity中SmoothStep介绍和应用: 溶解特效优化

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

跨域问题解决方案

【深度学习】图像多标签分类任务,百度PaddleClas
![112.网络安全渗透测试—[权限提升篇10]—[Windows 2003 LPK.DDL劫持提权&msf本地提权]](/img/b6/6dfe9be842204567096d1f4292e8e7.png)
112.网络安全渗透测试—[权限提升篇10]—[Windows 2003 LPK.DDL劫持提权&msf本地提权]

How to connect 5V serial port to 3.3V MCU serial port?

Matlab implementation of Huffman coding and decoding with GUI interface
随机推荐
2022年在启牛开华泰的账户安全吗?
问题:先后键入字符串和字符,结果发生冲突
Review and arrangement of HCIA
SQL lab 1~10 summary (subsequent continuous update)
ES底层原理之倒排索引
ENSP MPLS layer 3 dedicated line
zero-shot, one-shot和few-shot
Superscalar processor design yaoyongbin Chapter 9 instruction execution excerpt
Common locking table processing methods in Oracle
Matlab implementation of Huffman coding and decoding with GUI interface
Tutorial on principles and applications of database system (009) -- conceptual model and data model
Routing strategy of multi-point republication [Huawei]
30. Feed shot named entity recognition with self describing networks reading notes
H3C HCl MPLS layer 2 dedicated line experiment
Solutions to cross domain problems
Learning and using vscode
30. Few-shot Named Entity Recognition with Self-describing Networks 阅读笔记
Static comprehensive experiment
"Series after reading" my God! It's so simple to understand throttling and anti shake~
<No. 9> 1805. 字符串中不同整数的数目 (简单)