Ημερήσια αρχεία: 24 Απριλίου 2021


Cloudflare: Error 522 – Connection timed out 2

Recently, we’ve been noticing weird behavior on sites that are proxied behind Cloudflare servers. While visiting a site from one internet connection, we are constantly getting a 522 error. If at that moment, we switch our internet connection on that machine and visit the same page, it works as expected.

We are sure that the servers we have access to did not run out of resources, nor does the firewall block Cloudflare IPs. All firewalls are properly configured to accept connections from the official Cloudflare IPs that were retrieved from here.

We will investigate it further, hopefully we will figure it out.


AttributeError: module ‘html5lib.treebuilders’ has no attribute ‘_base’

Recently, we were receiving the above error on a GNU/Linux Ubuntu 20.04 LTS.

AttributeError: module 'html5lib.treebuilders' has no attribute '_base'

We had installed beautifulsoup4 and html5lib using pip. To solve the issue, we had to uninstall the html5lib that was installed by pip and install it through apt.

# Remove html5lib if you have installed it with pip3:
pip3 uninstall html5lib;

pip3 install --upgrade beautifulsoup4
sudo apt-get install python3-html5lib