Emo_bert3.tar.gz seems broken

While trying to install the Deepy FAQ Dream distribution, I encounter problems with certificates:

requests.exceptions.SSLError: HTTPSConnectionPool(host=‘files.deeppavlov.ai’, port=443): Max retries exceeded with url: /deeppavlov_data/emotion_classification/emo_bert3.tar.gz?config=emo_bert (Caused by SSLError(SSLError(“bad handshake: Error([(‘SSL routines’, ‘tls_process_server_certificate’, ‘certificate verify failed’)])”)))

So I downloaded the file emo_bert3.tar.gz from http://files.deeppavlov.ai/deeppavlov_data/emotion_classification/emo_bert3.tar.gz and placed it to the /annotators/emotion_classification_deepy folder, where the dockerfile calling it resides. COPY ./emo_bert3.tar.gz . and RUN python -m deeppavlov install ./emo_bert3.tar.gz didn’t work, even though analogic commands in other dockfiles worked well. It failed with:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfd in position 0: invalid start byte

I’ve spent several hours fiddling with codecs and encodings, to no avail. Then I found that I can’t decompile it, unlike other .tar archives. So, is the file just damaged, or have I missed something critical while trying to load encodings in the dockerfile and convert it from different encodings to UTF-8?

I’m working on WSL on Windows 11.

Dear @PavelVeselsky ,

thank you for your interest in DeepPavlov products!

Unfortunately, I can’t recreate the issue you’re describing.
I manage to build the bot with the following command:

docker-compose -f docker-compose.yml -f assistant_dists/deepy_faq/docker-compose.override.yml up --build

The emo_bert file is successfully downloaded and unpacked. In Dockerfile the config for this model is dowloaded over here and through this config model is installed.
The config itself can be found in the annotator’s folder.

Hope this will help.

Kind regards,
Anna

Dear Anna,

thank you for the answer!

I used the same command, at least in Windows. With WSL, which imitates Ubuntu 22.04, I just added “sudo” in the beginning. I did some fiddling the Dockerfile, but I made sure that every difference from the original version is commented out.

The issue is in my certificate configuration, so no wonder that you can’t reproduce it. I imported the ca-certificates.crt to the WSL - before this import, most model installations failed with a similar error. I’m not sure if this certificate file is supposed to work for this as well, or if I should use another one. I didn’t find any option to request and install a specialized DP certificate.

I don’t know why the emo_bert3.tar.gz file used in my workaround seems corrupt, but with the proper certificate(s) loaded, it will no longer be needed.