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 -fthinks 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

Most upvoted comments

-f is used for testing domains, and -uf is for testing HTTP respond code of urls right?

Yes with expects ... I meant the content expected to be tested.

  • example.org is the content of local file or the content of remote file
    • Operation ==> SYNTAX ==> WHOIS ==> DNSLOOKUP ==> HTTP
  • https://example.org is the content of local file or the content of remote file
    • Operation ==> SYNTAX ==> HTTP

Could we rename this one?

:code:-n`` to -nf for logic? and -n on windows is as i recall number-of-loop

ping -n 4 example.org

@spirillen ✔️

Note: You can do -f https://* it will work.