Raspberry Trixie Error with Guide (Pi 5, AI Hat 2)

Yeah it would start the server in one window then in my other I was getting this:
pi@Pi5:~ $ curl -X POST http://localhost:8000/api/pull -H “Content-Type: application/json” -d ‘{“name”: “llama3.2:3b”}’

server=oatpp/1.4.0

code=500

description=Internal Server Error

stacktrace:

  • [oatpp::data::type::String::operator std::string() const]: Error. Null pointer.

  • [ApiController]: Error processing request

  • Error processing request

Hi,

I think there are 2 issues with the command:

  1. "name" instead of "model"**
  2. Missing the "stream" parameter

For hailo-ollama this is the command:

curl --silent http://localhost:8000/api/pull \
     -H 'Content-Type: application/json' \
     -d '{ "model": "qwen2:1.5b", "stream" : true }'
2 Likes

Hello Michael. Thanks for your comprehensive reply. I followed your instructions fully, and am able to say that the installation of hailo-apps appeared to complete successfully at some levels, although the reources all seem to be missing.

Here is a sample of what was logged. I haven’t included all of them, but you will see what the problem is: “downloaded file size does not match expected size”.

Download attempt 2/3 failed for https://hailo-csdata.s3.eu-west-2.amazonaws.com/resources/video/face_recognition.mp4: Downloaded file size (33374441) doesn’t match expected size (38037396)
Download attempt 3/3 failed for https://hailo-csdata.s3.eu-west-2.amazonaws.com/resources/video/walk_in_room.mp4: Downloaded file size (50347369) doesn’t match expected size (52415199)
Failed to download after 3 attempts: Downloaded file size (50347369) doesn’t match expected size (52415199)
Download attempt 3/3 failed for https://hailo-csdata.s3.eu-west-2.amazonaws.com/resources/video/face_recognition.mp4: Downloaded file size (33581361) doesn’t match expected size (3803739)

When I perform hailo-detect, I get the following error:

ERROR | installation.download_resources | Failed to download after 3 attempts: Downloaded file size (19905761) doesn’t match expected size (25501728)
WARNING | installation.download_resources | Some downloads failed:
WARNING | installation.download_resources | - yolov8m: Failed to download after 3 attempts: Downloaded file size (19905761) doesn’t match expected size (25501728)
ERROR | common.core | Download succeeded but file not found: /usr/local/hailo/resources/models/hailo10h/yolov8m.hef

In addition, whereas before I was able to access the ai both on the command line and via Open WebUI by issuing the command hailo-ollama, that command is no longer recognised.

Thanks for your ongoing patience in support.

OK, I decided to risk it and reinstalled the hailo-ollama server, and that at least seems to be working as it should. So please ignore the last paragraph above.

1 Like

@user473 Looks like connection issue during installation?

The connection has been fine. If it was occasional drop-outs, then at least some of the resources would have succeeded. Also, the rest of the draw-down all seems to have worked. It looks as if all of the download_resources files failed, though, and they all say that the file size is the problem.

Confirming all now working for me too, now eagerly awaiting new models to try.

I can’t yet figure out how to install Qwen2-VL-2B-Instruct though as it’s not showing in the models store.

Hi, Glad to hear it’s working! Currently only models from the list supported: curl --silent http://localhost:8000/hailo/v1/list

I have set up the virtual environment source setup_env.sh. I have then done hailo-download-resources --all. The resources seem to download correctly, with the exception of the hef files. Not a single one of these downloads! One sample line from the log:

Download attempt 3/3 failed for https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ModelZoo/Compiled/v5.1.0/hailo10h/resnet_v1_34.hef: Downloaded file size (16824864) doesn’t match expected size (18887840)

What is going wrong here? It isn’t a connection issue. I have checked the folder ~/hailo-apps/resources and all the sub-folders are populated except for /packages/ which is empty.

Is there an alternative way of downloading these files?

OK, I don’t have the fastest internet in the world. I’m waiting for my fibre-optic connection to arrive. In the meanwhile, my existing speeds are quite adequate for everything else I do. Why does this hailo-apps setup give such a short time for the download to occur? Is there a time-out set in the install.sh set-up?

Downloading resource: yolov8m_pose (type: model)
✓ URL valid: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ModelZoo/Compiled/v5.1.0/hailo10h/yolov8m_pose.hef
  Status: 200
  Size: 29367944 bytes
[====================================----] 92% (25.77/28.01 MB)
WARNING | installation.download_resources | Download attempt 1/3 failed for https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ModelZoo/Compiled/v5.1.0/hailo10h/yolov8m_pose.hef: Downloaded file size (27050753) doesn't match expected size (29367944)
[=================================-------] 84% (23.53/28.01 MB)
WARNING | installation.download_resources | Download attempt 2/3 failed for https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ModelZoo/Compiled/v5.1.0/hailo10h/yolov8m_pose.hef: Downloaded file size (24871529) doesn't match expected size (29367944)
[=================================-------] 84% (23.53/28.01 MB)
WARNING | installation.download_resources | Download attempt 3/3 failed for https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ModelZoo/Compiled/v5.1.0/hailo10h/yolov8m_pose.hef: Downloaded file size (24922317) doesn't match expected size (29367944)
ERROR | installation.download_resources | Failed to download after 3 attempts: Downloaded file size (24922317) doesn't match expected size (29367944)
WARNING | installation.download_resources | Some downloads failed:
WARNING | installation.download_resources |   - yolov8m_pose: Failed to download after 3 attempts: Downloaded file size (24922317) doesn't match expected size (29367944)
ERROR | common.core | Download succeeded but file not found: /usr/local/hailo/resources/models/hailo10h/yolov8m_pose.hef

This is driving me mad! Surely there must be a way of downloading these files from another source which is more tolerant of relatively slow download speeds? After all, mine seems to get 84%+ downloaded before it gives up.

Thanks for your ongoing help with this.

Hi @user473 ,

Timeout - yes - this line: hailo-apps/hailo_apps/installation/download_resources.py at main · hailo-ai/hailo-apps · GitHub

Alternative way - During the installation it prints the URL’s - you can try wget.

Thanks,

Thanks, Michael. Increasing the timeout helped, and I have succesfully used wget to mop up any files which failed to download.

Your help and patience are much appreciated!

Michael

1 Like

Thanks @user473 glad to hear it works!

Can you explain this a little more I am new to all this. (New as in fish on his first stroll on the beach)