Dear Kwant user,
I am trying to buil an extended system (supercell) by only defining its lattice vectors and its unit cell coordinate.  After doing that whenever I am trying to plot the system, I am getting the following error :

Traceback (most recent call last):
  File "practice.py", line 49, in <module>
    kwant.plot(syst)
  File "/usr/lib/python3/dist-packages/kwant/plotter.py", line 834, in plot
    sites_pos = sys_leads_pos(syst, sites)
  File "/usr/lib/python3/dist-packages/kwant/plotter.py", line 475, in sys_leads_pos
    num_lead_cells = site_lead_nr[-1][2] + 1
IndexError: list index out of range
______________________________________________________________

Nothing has been mentioned in the Kwant manual. I am also pasting the python code which I am trying to run :

import kwant
import matplotlib.pyplot
from math import sqrt

syst = kwant.Builder()

# Defining the lattice
sin_45 = 1 / sqrt(2)
cos_45 = 1 / sqrt(2)

lv=1
lat=kwant.lattice.general([(0,1),(1,0)],[(cos_45/2,sin_45/2),(cos_45/2+1,sin_45/2),(cos_45/2+1,-sin_45/2),(cos_45/2,-sin_45/2)])

a, b, c, d = lat.sublattices

t = 1.0
W=10
L=10

syst = kwant.Builder()

def make_cuboid(W=10, L=10):
    def cuboid_shape(pos):
        x, y = pos
        return 0 <= x < W and 0 <= y < L
    syst = kwant.Builder()
    syst[lat.shape(cuboid_shape, (0, 0))] = None
    syst[lat.a.neighbors()] = -0.5
    syst[lat.b.neighbors()] = 0.5
    syst[lat.c.neighbors()] = -0.5
    syst[lat.d.neighbors()] = 0.5
    return syst

kwant.plot(syst) 


I am requesting you to help me in this regard. Also please let me know how should I attach leads according to my choice in the above system.
--
Dr. Suman Chowdhury
Assistant Professor
 Dept. of Physics,
 Bangabasi College
 Kolkata- 700009, West Bengal, India.
 Ph no-+91-9830512232