funilrys / PyFunceble

The tool to check the availability or syntax of domain, IP or URL.
https://pyfunceble.github.io
Apache License 2.0
298 stars 46 forks source link

FR | mariadb = 'NoneType' #392

Open spirillen opened 1 month ago

spirillen commented 1 month ago

What is the problem you are experiencing?

After having testing PostgreSQL for a couple of days, I was to return to my MariaDB server, when I keep getting this error

Fatal Error: 'NoneType' object has no attribute 'encoding'

How can we reproduce the problem?

To reproduce the problem:

  1. install/upgrade PyFunceble python3.11 -m pip install -U -I --pre pyfunceble-dev
  2. modify ~/.config/PyFunceble/.PyFunceble.overwrite.yaml
    cli_testing:
      db_type: mariadb ( Same error if I gives mysql)
  3. run pyfunceble -c --preload --all --execution --hierarchical -f https://raw.githubusercontent.com/mypdns/matrix/refs/heads/master/source/porn_filters/strict_filters/hosts.list or pyfunceble --database-type mariadb -c --preload --all --execution --hierarchical -f https://raw.githubusercontent.com/mypdns/matrix/refs/heads/master/source/porn_filters/strict_filters/hosts.list

Do you have a screenshot?

Screenshot ![image](https://github.com/user-attachments/assets/7e62264b-6b0d-4c2a-b7da-2a363a39aa9b)

What did you expect to happen?

All databases would be supported {csv,mariadb,mysql,postgresql}

Is there a workaround?

Not yet

How did you configure PyFunceble?

cli_testing:
  db_type: mariadb
  inactive_db: yes
  whois_db: yes
lookup:
  dns: yes
  http_status_code: yes
  netinfo: yes
  special: yes
  whois: yes
  reputation: no
  platform: yes
  timeout: 2
dns:
  follow_server_order: no
  trust_server: yes
  server:
    - 9.9.9.10
    - 149.112.112.10
  protocol: UDP
  delay: 0.0

#proxy:
verify_ssl_certificate: no
max_http_retries: 2

platform:
  push: yes
  preferred_status_origin: recommended
  checker_priority:
    - availability
    - syntax
  checker_exclude:
    - reputation

Which Operating System did you use?

Ubuntu 22.04 LTS

Which Python Version did you use?

3.11

Which PyFunceble Version did you use?

4.3.0a4.dev

Additional context

This is only a issue on one of my virtual installs, which happens to be the one I tested with PostgreSQL, I have not seen this behavior anywhere else.... yet...

However, the one running on my desktop, refuses to generate any output files... Linux can be strange sometimes

spirillen commented 1 month ago

Found the bug... it was in my DB server, but weirdly enough, this was the only box infected by the setting.

This change the issue to a Feature request of better error reporting, logging.