Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
inevity opened this issue Jul 14, 2021 · 0 comments
Open

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

inevity opened this issue Jul 14, 2021 · 0 comments

Comments

@inevity
Copy link

inevity commented Jul 14, 2021

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 rroller/dahua#6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant