Yelp / elastalert

Easy & Flexible Alerting With ElasticSearch
https://elastalert.readthedocs.org
Apache License 2.0
7.99k stars 1.74k forks source link

AttributeError: module 'yaml' has no attribute 'FullLoader'---centos8.1 with elastalert-0.2.4 #3063

Open snailair opened 3 years ago

snailair commented 3 years ago

elastalert-create-index --config config.yaml

Traceback (most recent call last): File "/usr/local/bin/elastalert-create-index", line 11, in load_entry_point('elastalert==0.2.4', 'console_scripts', 'elastalert-create-index')() File "/usr/local/lib/python3.6/site-packages/elastalert-0.2.4-py3.6.egg/elastalert/create_index.py", line 195, in main data = yaml.load(config_file, Loader=yaml.FullLoader) AttributeError: module 'yaml' has no attribute 'FullLoader'

env: centos8.1.1911 elk-7.10.0 elastalert-0.2.4

I am using python3 that comes with centos8.1.1911

nsano-rururu commented 3 years ago

pip install PyYAML>=5.1

nsano-rururu commented 3 years ago

By the way, you installed it by the following operation. That should install PyYAML as well.

git clone https://github.com/Yelp/elastalert.git

# Install the module:
pip install "setuptools>=11.3"
python setup.py install
snailair commented 3 years ago

thanks! I have resolved i remove the centos8.1 python3 and i Compile install python3 ,Use the following command

tar xf Python-3.6.8.tar.xz yum -y install wget sqlite-devel xz gcc automake zlib-devel openssl-devel epel-release cd Python-3.6.8/ ./configure && make && make install