Hosted Video Inference error

I am using following code for Hosted Video Inference.

from roboflow import Roboflow

rf = Roboflow(api_key="*****************************")
project = rf.workspace().project("bottle-keypoints")
model = project.version("1").model

job_id, signed_url, expire_time = model.predict_video(
    "VID20240401111600.mp4",
    fps=5,
    prediction_type="batch-video",
)

results = model.poll_until_video_results(job_id)

print(results)

While running the code I am getting following error.

loading Roboflow workspace...
loading Roboflow project...
Traceback (most recent call last):
  File "C:\Users\timothym\mycode\infr_sdk_video.py", line 17, in <module>
    job_id, signed_url, expire_time = model.predict_video(
                                      ^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'predict_video'

What is the cause? How to resolve it. I have created anaconda environment and installed roboflow sdk.

Hi @Timothy_Malche - this should be fixed now!

Please run pip install --upgrade roboflow and try again.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.