8000 Cannot kick a participant · Issue #59 · twilio/twilio-python · GitHub
[go: up one dir, main page]

Skip to content

Cannot kick a participant #59

@kyleconroy

Description

@kyleconroy
Traceback (most recent call last):
File "confmanager.py", line 36, in <module>
p.kick()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twilio-3.3.6-py2.7.egg/twilio/rest/resources.py", line 1166, in kick
self.delete_instance()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twilio-3.3.6-py2.7.egg/twilio/rest/resources.py", line 251, in delete_instance
return self.parent.delete(self.name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/twilio-3.3.6-py2.7.egg/twilio/rest/resources.py", line 1209, in delete
return self._delete(call_sid)
AttributeError: 'Participants' object has no attribute '_delete'

My code:

for conf in confs:
age = time.mktime(time.gmtime()) - time.mktime(get_time(conf.date_created))
if age > MAX_CONF_AGE:
print "Terminating conference %s" % conf.sid
#while len(conf.participants.list()) > 0:
p = conf.participants.list().pop()
p.kick()
print "\tDisconnected participant %s" % p.call_sid

print

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0