IndentationError: expected an indented block

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ngutman
    New Member
    • Feb 2008
    • 2

    IndentationError: expected an indented block

    I am brand new to Python. I get the InentationError in line 4, NewRasterLayer.
    Can't figure what's wrong and how to fix it.
    Please help.
    Nathan
    if bg == 1:

    # New Raster Layer
    App.Do( Environment, 'NewRasterLayer ', {
    'General': {
    'Opacity': 100,
    'Name': u'Raster 2',
    'IsVisible': True,
    'IsTransparency Locked': False,
    'LinkSet': 0,
    'UseHighlight': False,
    'PaletteHighlig htColor': (255,255,64),
    'GroupLink': True,
    'BlendMode': App.Constants.B lendMode.Normal
    },
    'BlendRanges': {
    'BlendRangeGree n': (0,0,255,255,0, 0,255,255),
    'BlendRangeRed' : (0,0,255,255,0, 0,255,255),
    'BlendRangeBlue ': (0,0,255,255,0, 0,255,255),
    'BlendRangeGrey ': (0,0,255,255,0, 0,255,255)
    },
    'GeneralSetting s': {
    'ExecutionMode' : App.Constants.E xecutionMode.De fault,
    'AutoActionMode ': App.Constants.A utoActionMode.M atch,
    'Version': ((10,0,3),1)
    }
    })
    # LayerMergeVisib le Nathan
    App.Do( Environment, 'LayerMergeVisi ble', {
    'GeneralSetting s': {
    'ExecutionMode' : App.Constants.E xecutionMode.De fault,
    'AutoActionMode ': App.Constants.A utoActionMode.M atch,
    'Version': ((10,0,0),3)
    }
    })
  • ngutman
    New Member
    • Feb 2008
    • 2

    #2
    I thought that indentations will come through OK but all the spaces were stripped.
    Let me try again,
    Nathan

    Comment

    • bvdet
      Recognized Expert Specialist
      • Oct 2006
      • 2851

      #3
      Enclose your code in code tags
      Open code tag: [code=Python]
      Close code tag: [/c o d e] (leave out the spaces)

      Comment

      Working...