Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Creation of Transcribe Recording fails #3

0x19 opened this Issue · 1 comment

2 participants


There are multiple issues within following code:

from telapi import rest

account_sid = '{AccountSid}'
auth_token  = '{AuthToken}'
client      = rest.Client(account_sid, auth_token)
account     = client.accounts[client.account_sid]

recording_sid = False

for recording in account.recordings[:1]: 
   recording_sid = recording.sid

transcribe  = account.recordings[recording_sid].transcriptions.create( 
    transcribe_callback = '',
    quality = 'gold'
print "Transcribe Recording Sid: %s" % transcribe.sid

1.) Quality POST parameter is missing from allowed attributes

File "", line 15, in <module>
    quality = 'gold'
  File "/usr/local/lib/python2.7/dist-packages/telapi-0.0.3-py2.7.egg/telapi/rest/", line 208, in create
    resource_instance =**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/telapi-0.0.3-py2.7.egg/telapi/rest/", line 203, in new
    resource_instance = _name_to_instance_class(self._name)(parent=self, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/telapi-0.0.3-py2.7.egg/telapi/rest/", line 244, in __init__
    setattr(self, key, value)
  File "/usr/local/lib/python2.7/dist-packages/telapi-0.0.3-py2.7.egg/telapi/rest/", line 306, in __setattr__
    raise AttributeError("'%s' not a valid attribute of %s (allowed attributes: %s)" % (name, self, self._allowed_attributes))
AttributeError: 'quality' not a valid attribute of < object at 0x2bdd3d0> (allowed attributes: [u'status', u'recording_sid', u'date_updated', u'price', u'transcribe_callback', u'audio_url', u'duration', u'callback_method', u'transcription_text', u'uri', u'account_sid', u'sid', u'date_created', u'type', u'api_version'])


  File "", line 14, in <module>
    transcribe_callback = ''
  File "/usr/local/lib/python2.7/dist-packages/telapi-0.0.3-py2.7.egg/telapi/rest/", line 209, in create
  File "/usr/local/lib/python2.7/dist-packages/telapi-0.0.3-py2.7.egg/telapi/rest/", line 319, in save
    resource_data = self._client._post(self._url + ".json", data)
  File "/usr/local/lib/python2.7/dist-packages/telapi-0.0.3-py2.7.egg/telapi/rest/", line 395, in _post
    return self._send_request(resource_uri, "POST", params)
  File "/usr/local/lib/python2.7/dist-packages/telapi-0.0.3-py2.7.egg/telapi/rest/", line 389, in _send_request
    return json.loads(response.text)
  File "/usr/lib/python2.7/json/", line 326, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/", line 382, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting , delimiter: line 18 column 5 (char 518)

Tested to be working with code provided above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.