PTZ service not working "NoneType object has no attribute relative"


I integrate an onvif camera to home assistant without problems and my camera has PTZ, but for any reason that I still can’t figure it out when i call the service onvif.ptz to move my camera it always get the same error:

2021-08-19 13:41:56 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547277151728] 'NoneType' object has no attribute 'relative'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/", line 185, in handle_call_service
  File "/usr/src/homeassistant/homeassistant/", line 1491, in async_call
  File "/usr/src/homeassistant/homeassistant/", line 1526, in _execute_service
  File "/usr/src/homeassistant/homeassistant/helpers/", line 665, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/", line 658, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/", line 856, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/", line 695, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/onvif/", line 196, in async_perform_ptz
    await self.device.async_perform_ptz(
  File "/usr/src/homeassistant/homeassistant/components/onvif/", line 389, in async_perform_ptz
    if not profile.ptz.relative:
AttributeError: 'NoneType' object has no attribute 'relative'

the user that i’m using for onvif has permission to use ptz so i don’t really know what else to do.

Please any advice will be appreciate it.