Hello dear Community,
I'm currently facing an issue while integrating Fail2Ban with Cloudflare via AA Panel. During the connection test, I'm encountering a "Connection failed" error (see screenshot)
and the following traceback is logged:
[2024-08-23 01:21:25][DEBUG] - Traceback (most recent call last):
File "/www/server/panel/class/public/common.py", line 52, in gettext_msg2
return es.gettext(msg)
^^^^^^^^^^^^^^^
File "/www/server/panel/pyenv/lib/python3.12/gettext.py", line 431, in gettext
tmsg = self._catalog.get(message, missing)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unhashable type: 'dict'
It appears that the Python script is passing a dictionary where it expects a string, causing a TypeError. This issue arises both during connection testing and potentially during runtime operations.
Steps I've Taken:
- I attempted to re-enter the Cloudflare API token and email but still encountered the issue.
- I created a new API on CloudFlare and tried with that.
- I reviewed the relevant Python scripts (common.py and gettext.py) and identified that the problem lies in the handling of the msg parameter in the gettext function.
Questions:
- Has anyone else encountered this issue when integrating Fail2Ban with Cloudflare through AA Panel?
- Are there any recommended fixes or patches to prevent this TypeError from occurring?
- Will this error impact the actual runtime performance of the Fail2Ban-Cloudflare integration, or is it only a problem during connection testing?
I appreciate any guidance or suggestions from the community. I'm happy to provide more details if needed.
Thank you!