PyFunceble icon indicating copy to clipboard operation
PyFunceble copied to clipboard

FR | mariadb = 'NoneType'

Open spirillen opened this issue 1 year ago • 1 comments

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

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 avatar Oct 09 '24 12:10 spirillen

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.

spirillen avatar Oct 09 '24 12:10 spirillen

Is it possible that you were using the charset utf-8 instead of utf8 ? That's the only possible explanation.

funilrys avatar Mar 20 '25 12:03 funilrys

By the way: --debug will activate the debug modus but it doesn't mean that we will print huge logging. When using it, it will force PyFunceble to print tracebacks at the end - if some are available.

funilrys avatar Mar 20 '25 12:03 funilrys