PyFunceble: -uf all invalid, buts ok as local file
Bug description
If you use the Pyf with -uf 'url'
all records is marked as invalid, but if you download the same file and then test it with the -f
thinks runs as excepted
Modifications under .PyFunceble.yaml
nothing
Reproduction
Steps to reproduce the behavior:
pyfunceble -m -p 8 -db --database-type mariadb -uf 'https://gitlab.com/my-privacy-dns/external-sources/antipopads/raw/master/hosts'
Subject Status HTTP Code
---------------------------------------------------------------------------------------------------- ----------- ----------
jyahmckzsbh.com INVALID ***
nuowoczmvits.com INVALID ***
dsdiztki.bid INVALID ***
lwtsrwwlfd.com INVALID ***
wftduglf.com INVALID ***
wget 'https://gitlab.com/my-privacy-dns/external-sources/antipopads/raw/master/hosts'
pyfunceble -m -p 8 -db --database-type mariadb -f hosts
Subject Status HTTP Code
---------------------------------------------------------------------------------------------------- ----------- ----------
xrkfqpbubaq.com ACTIVE ***
htabtzmi.bid INACTIVE ***
Expected behavior**
Tets running equally
Versions
OS: Ubuntu Bionic Python Version: 3.7 PyFunceble Version: pyfunceble 2.2.0. (Green Galago: Skitterbug)
Additional context
sudo -H python3 -m pip install --upgrade PyFunceble
prior to the test…
with sudo -H python3 -m pip install --upgrade PyFunceble-dev
resolts is:
pyfunceble -m -p 8 -db --database-type mariadb -uf 'https://gitlab.com/my-privacy-dns/external-sources/antipopads/raw/master/hosts'
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/PyFunceble/cli/__init__.py", line 95, in tool
PyFunceble.load_config(generate_directory_structure=False)
File "/usr/local/lib/python3.6/dist-packages/PyFunceble/__init__.py", line 682, in load_config
cconfig.Load(CONFIG_DIRECTORY, custom)
File "/usr/local/lib/python3.6/dist-packages/PyFunceble/config/load.py", line 90, in __init__
self.__load_it()
File "/usr/local/lib/python3.6/dist-packages/PyFunceble/config/load.py", line 101, in __load_it
self._load_config_file()
File "/usr/local/lib/python3.6/dist-packages/PyFunceble/config/load.py", line 300, in _load_config_file
self._install_iana_config()
File "/usr/local/lib/python3.6/dist-packages/PyFunceble/config/load.py", line 409, in _install_iana_config
iana_link = self.data["links"]["iana"]
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/pyfunceble", line 8, in <module>
sys.exit(tool())
File "/usr/local/lib/python3.6/dist-packages/PyFunceble/cli/__init__.py", line 1039, in tool
PyFunceble.LOGGER.exception()
AttributeError: 'NoneType' object has no attribute 'exception'
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (15 by maintainers)
Commits related to this issue
- Several fixes. 1. Fix issue with the saving of data into the MariaDB/MySQL database. Indeed, before this patch, if activated along with the multiprocessing activation flag, no data were saved. ... — committed to funilrys/PyFunceble by funilrys 5 years ago
- Rename `-n` to `-nf`. This patch fix https://github.com/funilrys/PyFunceble/issues/59#issuecomment-555790070 Contributors: * @spirillen — committed to funilrys/PyFunceble by funilrys 5 years ago
Yes with
expects ...
I meant the content expected to be tested.example.org
is the content oflocal file
or the content ofremote file
https://example.org
is the content oflocal file
or the content ofremote file
@spirillen ✔️
Note: You can do
-f https://*
it will work.