Traceback (most recent call last) error on SciTE

I run a script creating retaining wall as follows, which is similar to Plaxis training video. However there was a error as in the picture below. Could you help me to fix this? Thank you

CODE:

# PLAXIS boilerplate
from plxscripting.easy import new_server, get_equivalent

localport = 10000
pw = r'G<12345678'
s_i, g_i = new_server('localhost', localport, password = pw)
def create_retaining_wall(wall_length, excavationwidth):
"""
Generate the plate element based on the wall length
:param wall_length: length of the wall
:return: line object with plate and interface
"""
start_x = excavationwidth
surface_elevation = 30
start_y = surface_elevation
newitems = g_i.line(start_x, start_y, start_x, start_y - wall_length)
# newitems is a list, containing the newly created points and the line
line = newitems[-1]
# define plate and interfaces on this line
g_i.plate(line)
g_i.posinterface(line)
g_i.neginterface(line)
# also set the material
line.Plate.Material = g_i.Dwall
return line

def run_parameter_case(wall_length, tiebackdepths, tieback_length, bonded_length,
tieback_angle, tieback_prestress,
excavationwidth, excavationdepth):

# Load a basic model with soil layers, soil datasets and structural datasets
basicmodel = r'H:\1. DATA\document\PLAXIS\Bentley training\Basic parametric model1.p2dx'
s_i.open(basicmodel)
# Create the wall, based on length
wall_line = create_retaining_wall(wall_length, excavationwidth)
# Create the excavation volumes (useful for easy deactivation)
# Create the tiebacks
# Generate the mesh
# Construct phases
# Calculation
# Retrieve Output results: max hor defection, maximum bending moment
# settlements at distance 1, 10, 30 m

#start parameters
wall_length = 26
excavationwidth = 20
excavationdepth = 18
tiebackdepths = [3, 7, 11, 14]
tieback_length = 16
bonded_length = 4
tieback_angle = 25
tieback_prestress = 800

run_parameter_case(wall_length,
tiebackdepths, tieback_length, bonded_length,
tieback_angle, tieback_prestress,
excavationwidth, excavationdepth)

ERROR

>C:\ProgramData\Bentley\Geotechnical\PLAXIS Python Distribution V1 Update 1\python\pythonw.exe -u "excavation_tieback.py"
Traceback (most recent call last):
File "C:\ProgramData\Bentley\Geotechnical\PLAXIS Python Distribution V1 Update 1\python\lib\site-packages\plxscripting\plxproxy.py", line 177, in __getattr__
return self._getattr(attr_name)
File "C:\ProgramData\Bentley\Geotechnical\PLAXIS Python Distribution V1 Update 1\python\lib\site-packages\plxscripting\plxproxy.py", line 114, in _getattr
raise AttributeError("Requested attribute '{}' is not present".format(attr_name))
AttributeError: Requested attribute 'line' is not present

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "excavation_tieback.py", line 58, in <module>
excavationwidth, excavationdepth)
File "excavation_tieback.py", line 36, in run_parameter_case
wall_line = create_retaining_wall(wall_length, excavationwidth)
File "excavation_tieback.py", line 17, in create_retaining_wall
newitems = g_i.line(start_x, start_y, start_x, start_y - wall_length)
File "C:\ProgramData\Bentley\Geotechnical\PLAXIS Python Distribution V1 Update 1\python\lib\site-packages\plxscripting\plxproxy.py", line 180, in __getattr__
return self._getattr(attr_name)
File "C:\ProgramData\Bentley\Geotechnical\PLAXIS Python Distribution V1 Update 1\python\lib\site-packages\plxscripting\plxproxy.py", line 114, in _getattr
raise AttributeError("Requested attribute '{}' is not present".format(attr_name))
AttributeError: Requested attribute 'line' is not present
>Exit code: 1

Screenshot