Tools icon indicating copy to clipboard operation
Tools copied to clipboard

TypeError: object of type 'bool' has no len()

Open inevity opened this issue 3 years ago • 0 comments

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

inevity avatar Jul 14 '21 04:07 inevity