Tools
Tools copied to clipboard
TypeError: object of type 'bool' has no len()
found the self.RemoteServicesCache first {} dict type,then bool type . Just add this code ,can enter into the local console.
def CheckForService(self, service):
query_args = {
"method":"system.listService",
"session":self.SessionID,
"params":None,
"id":self.ID
}
log.info("Rservicecache: {}".format(self.RemoteServicesCache))
if self.RemoteServicesCache == False: // add here
return False // add here
if not len(self.RemoteServicesCache):
self.RemoteServicesCache = self.SendCall(query_args)
if self.RemoteServicesCache == False:
return False
if service == 'dump':
return
see https://github.com/rroller/dahua/issues/6