Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Expected an indented block
#1
Hello I keep getting an error saying
Quote:Expected an indented block
but then i add an indentation and i get
Quote:inconsistent use of tabs and spaces

below is my code

class myHTTPTransport(HTTPTransport):
	username = None
	passwd = None

	@classmethod
	def setAuthentication(cls,u,p):
		cls.username = u
		cls.passwd = p

	def call(self, addr, data, namespace, soapaction=None, encoding=None,
		http_proxy=None, config=Config, timeout=None):

	if not isinstance(addr, SOAPAddress):
		addr=SOAPAddress(addr, config)

	if self.username != None:
		addr.user = self.username+":"+self.passwd

	return HTTPTransport.call(self, addr, data, namespace, soapaction,
								encoding, http_proxy, config)
thanks in advance
Reply


Messages In This Thread
Expected an indented block - by Nicoles07 - Sep-15-2017, 03:43 PM
RE: Expected an indented block - by ichabod801 - Sep-15-2017, 04:54 PM
RE: Expected an indented block - by deaspo - Sep-15-2017, 05:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to write in text file - indented block Joni_Engr 4 8,413 Jul-18-2022, 09:09 AM
Last Post: Hathemand
  how far is this line indented? Skaperen 3 2,068 May-30-2022, 05:49 PM
Last Post: Skaperen
  error "IndentationError: expected an indented block" axa 4 4,035 Sep-08-2020, 02:09 PM
Last Post: ibreeden
  IndentationError: expected an indented block ryder5227 2 3,312 Sep-27-2019, 06:59 PM
Last Post: jefsummers
  [SOLVED] Expected An Indented Block Panda 4 7,245 Jun-06-2018, 09:57 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020