Skip to content

Impossible to enable AI for the first time #1072

Closed

Description

@passatdream

Workaround below: #1072 (comment)


Hello,

I'm running into an issue whenever I try to enable AI integration with QualCoder 3.6.

After selecting the model and entering the API key, the window for installing AI components appears and whenever clicked OK, I run into the following error:

TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

Error traceback (most recent call last):
"File "qualcoder\ai_async_worker.py", line 108, in run

File "qualcoder\ai_vectorstore.py", line 236, in _download_embedding_model

TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'"

I've tried manually installing the model like in #1012, but I still encounter the same issue. I also deleted the .qualcoder folder. I even downloaded it with Python, but nothing works.

Thanks a lot for your help.

Best regards,

Alex

Image

Activity

  1. ronaldobaltar commented on Jun 27, 2025

    @ronaldobaltar

    I have exactly the same issue. I tried enabling the AI feature in both the setup installation and the portable version of QualCoder on Windows 10 and Windows 11, and encountered the same problem.

  2. kaixxx commented on Jun 28, 2025

    @kaixxx
    Collaborator

    Strange, I have just tested it on my system and the download works. Could it be that the network access for QualCoder is blocked somehow, e.g. by a local firewall? Or by your government, as it was the case in the other issue report that you've linked to?

    Do you have the following folder (on Windows): C:\Users\USERNAME\.cache\torch\sentence_transformers\intfloat_multilingual-e5-large?
    What are the contents of this folder? Check if all these files are there:

    Image

    The subfolder 1_Pooling should contain only one file named config.json

    If any files are missing, download them from here: https://huggingface.co/intfloat/multilingual-e5-large/tree/main

  3. passatdream commented on Jun 28, 2025

    @passatdream
    Author

    @kaixxx
    Sorry I closed the issue by mistake.

    I've tried disabling the various firewalls as well as Windows Defender real time protection on Windows 11, but I still encounter the same issue. I strongly believe the government wouldn't block this where I live.

    Sometimes, after the initial error message this uncaught exception appears.

    Image

    I do have the .cache\torch\sentence_transformers\intfloat_multilingual-e5-large with only the Pooling folder and a .gitattributes.tmp file.
    I already tried downloading the various files from Huggingface and putting them into the folder but to no success, it still asks to download the AI components and the same error appears.

    One of my colleague tried as well and ran into the exact same issue.

    Best regards,

    Alex

  4. kaixxx commented on Jun 28, 2025

    @kaixxx
    Collaborator

    Are you on Linux?

  5. passatdream commented on Jun 28, 2025

    @passatdream
    Author

    @kaixxx

    Are you on Linux?

    No, Windows 11

  6. kaixxx commented on Jun 28, 2025

    @kaixxx
    Collaborator

    This is really a mystery.

    The fact that you have a gitattributes.tmp file shows that the download was somehow interrupted. What you can try two things:

    • Close QualCoder, delete the whole intfloat_multilingual-e5-large folder, and let QualCoder redownload everything.
    • If this does not work, delete all the contents form intfloat_multilingual-e5-large and download all the necessary files from huggingface (again).

    QualCoder checks on startup if all the necessary files are in this folder, and only if one or more is missing, the download routine is started. When you tried downloading the files before, you must have missed one, or the naming of one of the files was wrong, or the file in the Pooling folder was missing, whatever. At least this is the only explanation I can think of...

  7. passatdream commented on Jun 29, 2025

    @passatdream
    Author

    Hello,

    So I tried with both the portable version and the installer version, I also tried to run as administrator.

    • The first thing doesn't work. QualCoder will not redownload the right files and I had the same elements as before.

    • Downloading the necessary files from Huggingface worked, but the window for installing AI components still appears and the same error as well. After that it worked (I used the portable version).
      The installing windows appears whenever QualCoder is launched and we have to go to the same error again, but after that IA is ready.

    Thanks a lot for your help. If you need more details, let me know.

    Best regards,

    Alex

  8. kaixxx commented on Jun 30, 2025

    @kaixxx
    Collaborator

    I have investigated a little more and may have found the root cause of the issue: huggingface has changed some internal settings on their servers, which affects the download routine in QualCoder for some of the files mentioned above (.gitattributes and Readme.md in particular).

    Unfortunately, this problem is more severe than I had hoped for, as it affects any user that newly activates the AI-support in QualCoder. Thank you for making us aware of this issue.
    I will try to get a temporary workaround set up today. A permanent solution will only be possible in a next release. @ccbogel: We can discuss via email what to do and when such a new release could be possible.

    @passatdream: I have a suspicion why you still get the error message, despite having downloaded all the necessary files. It seems that while downloading the file .gitattributes, the name automatically changes to gitattributes.txt. This would retrigger the download routine in QualCoder. You must correct the filename by adding the . in front and removing the .txtextension at the end. I hope this will fix the issue for you.

  9. reopened this on Jun 30, 2025
  10. added
    bug
    on Jun 30, 2025
  11. kaixxx commented on Jul 1, 2025

    @kaixxx
    Collaborator

    Error Description and Workaround

    What is the issue?

    When you activate the AI integration in QualCoder for the first time, QualCoder must download additional components from huggingface.co, a popular platform for AI research and development. Unfortunately, huggingface has recently made some changes to their server settings, which breaks the download routine in QualCoder. At every startup, QualCoder will retry, resulting in the following error message:

    You can continue working with QualCoder, but most of the AI features will be non-functional.

    Workaround

    • Close QualCoder
    • Locate the folder for the download:
      • Windows: C:\Users\USERNAME\.cache\torch\sentence_transformers\intfloat_multilingual-e5-large
      • macOS: /Users/USERNAME/.cache/torch/sentence_transformers/intfloat_multilingual-e5-large
      • Linux: /home/USERNAME/.cache/torch/sentence_transformers/intfloat_multilingual-e5-large
    • Download this zip file: https://drive.switch.ch/index.php/s/7I56HSshG7xMiTi
    • Unzip the contents in the above folder. Make sure to keep the folder structure of the zip file intact. It will create a subfolder called 1_Pooling containing the file config.json.
    • The result should look like this:

    • Restart and enjoy QualCoder, it should be fully functional now.
    • We will include a solution in the next release that does not need this workaround.
  12. ChinchuC commented on Jul 1, 2025

    @ChinchuC

    Hi

    I have tried this workaround, and the issue seems to be sorted out. Blablador AI is now loading when I start Qualcoder. Thanks.

    Note: When prompted, I replaced the 1_Pooling folder in the folder at C:\Users\USERNAME.cache\torch\sentence_transformers\intfloat_multilingual-e5-large with the one with the same name in the Zip file while extracting it. Hope that is the correct procedure to follow

  13. kaixxx commented on Jul 23, 2025

    @kaixxx
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions