# Overlay import Error on Zedboard

**URL:** <https://discuss.pynq.io/t/overlay-import-error-on-zedboard/1194>\
**Category:** Support\
**Created:** [April 28, 2020, 11:50am UTC](https://discuss.pynq.io/t/overlay-import-error-on-zedboard/1194 "2020-04-28T11:50:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nairitb](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/nairitb/32/836_2.png) [@nairitb](https://discuss.pynq.io/u/nairitb)\
**Post date:** [April 28, 2020, 11:50am UTC](https://discuss.pynq.io/t/overlay-import-error-on-zedboard/1194/1 "2020-04-28T11:50:55Z")

</div>

I built an image for Zedboard using PYNQ v2.3. I am using Vivado, SDK and Petalinux 2018.2.

I did not any prebuilt image file and used only the Petalinux BSP **avnet-digilent-zedboard-v2018.2-final.bsp** downloaded from Xilinx.

I created a folder Zedboard inside which I put the BSP file and a **Zedboard.spec** file. The contents of the **Zedboard.spec** file are:

```auto
ARCH_Zedboard := arm
BSP_Zedboard := avnet-digilent-zedboard-v2018.2-final.bsp
BITSTREAM_Zedboard := 

STAGE4_PACKAGES_Zedboard := pynq boot_leds ethernet

```

I completed the build, after facing few errors during build, thanks to [PeterOgden](https://discuss.pynq.io/u/PeterOgden). I burned the image from the output folder onto a 16GB SD card.

I can login to my Zedboard using pynq:9090. However, when I try to import:

```
from pynq import PL
from pynq import Overlay

ol = Overlay(PL.bitfile_name)

```

I got the following error:

```auto
---------------------------------------------------------------------------
ConnectionError Traceback (most recent call last)
<ipython-input-1-86472a2f9022> in <module>()
      2 from pynq import Overlay
      3 
----> 4 ol = Overlay(PL.bitfile_name)

/usr/local/lib/python3.6/dist-packages/pynq/pl.py in bitfile_name(cls)
   1163 
   1164 """
-> 1165 cls.client_request()
   1166 cls.server_update()
   1167 return cls._bitfile_name

/usr/local/lib/python3.6/dist-packages/pynq/pl.py in client_request(cls, address, key)
   1313 except FileNotFoundError:
   1314 raise ConnectionError(
-> 1315 "Could not connect to PL server") from None
   1316 cls._bitfile_name, cls._timestamp, \
   1317 cls._ip_dict, cls._gpio_dict, \

ConnectionError: Could not connect to PL server

```

**UPDATE:** I solved the error by restarting the Zedboard. But I am now faced with this error:

```nohighlight
OSError Traceback (most recent call last)
<ipython-input-3-86472a2f9022> in <module>()
      2 from pynq import Overlay
      3 
----> 4 ol = Overlay(PL.bitfile_name)

/usr/local/lib/python3.6/dist-packages/pynq/overlay.py in __init__ (self, bitfile_name, download, partial, ignore_version)
    289 
    290 """
--> 291 super(). __init__ (bitfile_name, partial)
    292 
    293 hwh_path = get_hwh_name(self.bitfile_name)

/usr/local/lib/python3.6/dist-packages/pynq/pl.py in __init__ (self, bitfile_name, partial)
   1586 else:
   1587 raise IOError('Bitstream file {} does not exist.'
-> 1588 .format(bitfile_name))
   1589 
   1590 self.timestamp = ''

OSError: Bitstream file /usr/local/lib/python3.6/dist-packages/pynq/overlays/.bit does not exist.

```

**Can someone please help?**

---

<div class="post-metadata">

**Author:** ![rock](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/rock/32/32_2.png) [@rock](https://discuss.pynq.io/u/rock)\
**Post date:** [April 28, 2020, 5:28pm UTC](https://discuss.pynq.io/t/overlay-import-error-on-zedboard/1194/2 "2020-04-28T17:28:18Z")

</div>

First, `boot_leds` is a package that requires you to have some base overlay so LEDs can be flashed after boot. If you don’t have it that service is going to fail. Maybe you have already noticed that.

Second, if you don’t have a base overlay targeting your board, PL.bitfile\_name will be empty so `ol = Overlay(PL.bitfile_name)` won’t work. If you have any bitstream (along with the hwh file), then you can call `ol=Overlay('your_bitstream.bit')`

---

<div class="post-metadata">

**Author:** ![nairitb](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/nairitb/32/836_2.png) [@nairitb](https://discuss.pynq.io/u/nairitb)\
**Post date:** [April 28, 2020, 5:53pm UTC](https://discuss.pynq.io/t/overlay-import-error-on-zedboard/1194/3 "2020-04-28T17:53:06Z")

</div>

Thanks a lot [rock](https://discuss.pynq.io/u/rock) . I realised my mistake.

I didn’t configure the PL for the Zedboard properly.

Thanks again,  
Nairit
