3

I've been trying to request a Onvif Snapshot but the GetSnapshotUri() function takes a "Profile Token" as argument.

I've called the function GetProfiles() and it's result is a list of profiles and one of them has a _token = "MediaProfile000".

If I just type this token in the GetSnapshotUri() function, it say's:

onvif.exceptions.ONVIFError: Unknown error: Method instance argument after ** must be a mapping, not str

So I tried this way:

profilesList = media.GetProfiles()
firstProfile = profilesList[0]
mediaProfileToken = firstProfile._token
media.GetSnapshotUri(mediaProfileToken)

But guess what?

onvif.exceptions.ONVIFError: Unknown error: Method instance argument after ** must be a mapping, not Text

Please Help

isuruAb
  • 2,202
  • 5
  • 26
  • 39
Luiz Silva
  • 31
  • 1
  • 4

1 Answers1

3
profilesList = media.GetProfiles()
firstProfile = profilesList[0]
mediaProfileToken = firstProfile.token
media.GetSnapshotUri(mediaProfileToken)

this is worked for me!! replacing firstProfile._token by firstProfile.token

Emam
  • 63
  • 7