# An error of xrt\_info

**URL:** <https://discuss.pynq.io/t/an-error-of-xrt-info/7617>\
**Category:** Support\
**Created:** [October 17, 2024, 8:47am UTC](https://discuss.pynq.io/t/an-error-of-xrt-info/7617 "2024-10-17T08:47:52Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ctuglzh](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@ctuglzh](https://discuss.pynq.io/u/ctuglzh)\
**Post date:** [October 17, 2024, 8:47am UTC](https://discuss.pynq.io/t/an-error-of-xrt-info/7617/1 "2024-10-17T08:47:52Z")

</div>

Hello, I tried to use PYNQ3.0 on the kria kv260 development board and encountered the following problem: I can successfully load the bitstream file using overlay in the jupternotebook debugging page, but when I try to use sysyemb to write a process named fpga\_load.service, the following error occurs:  
Oct 13 06:22:23 kria systemd[1]: /etc/systemd/system/fpga\_load.service:1: Unknown section ‘Uint’. Ignoring.  
Oct 13 06:22:23 kria systemd[1]: Starting fpga\_load.service…  
Oct 13 06:22:28 kria python3[4957]: /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl\_server/device.py:56: UserWarning: No devices found, is the XRT environment sourced?  
Oct 13 06:22:28 kria python3[4957]: warnings.warn(  
Oct 13 06:22:28 kria python3[4957]: Traceback (most recent call last):  
Oct 13 06:22:28 kria python3[4957]: File “”, line 1, in   
Oct 13 06:22:28 kria python3[4957]: File “/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/overlay.py”, line 315, in **init**  
Oct 13 06:22:28 kria python3[4957]: super(). **init** (bitfile\_name, dtbo, partial=False, device=device)  
Oct 13 06:22:28 kria python3[4957]: File “/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/bitstream.py”, line 88, in **init**  
Oct 13 06:22:28 kria python3[4957]: device = Device.active\_device  
Oct 13 06:22:28 kria python3[4957]: File “/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl\_server/device.py”, line 71, in active\_device  
Oct 13 06:22:28 kria python3[4957]: raise RuntimeError(“No Devices Found”)  
Oct 13 06:22:28 kria python3[4957]: RuntimeError: No Devices Found  
Oct 13 06:22:29 kria systemd[1]: fpga\_load.service: Main process exited, code=exited, status=1/FAILURE  
Oct 13 06:22:29 kria systemd[1]: fpga\_load.service: Failed with result ‘exit-code’.  
Oct 13 06:22:29 kria systemd[1]: Failed to start fpga\_load.service.  
Oct 13 06:22:29 kria systemd[1]: fpga\_load.service: Consumed 5.587s CPU time.  
Oct 13 06:26:18 kria systemd[1]: Starting fpga\_load.service…  
Oct 13 06:26:23 kria python3[5548]: /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl\_server/device.py:56: UserWarning: No devices found, is the XRT environment sourced?  
Oct 13 06:26:23 kria python3[5548]: warnings.warn(  
Oct 13 06:26:23 kria python3[5548]: Traceback (most recent call last):  
Oct 13 06:26:23 kria python3[5548]: File “”, line 1, in   
Oct 13 06:26:23 kria python3[5548]: File “/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/overlay.py”, line 315, in **init**  
Oct 13 06:26:23 kria python3[5548]: super(). **init** (bitfile\_name, dtbo, partial=False, device=device)  
Oct 13 06:26:23 kria python3[5548]: File “/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/bitstream.py”, line 88, in **init**  
Oct 13 06:26:23 kria python3[5548]: device = Device.active\_device  
Oct 13 06:26:23 kria python3[5548]: File “/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl\_server/device.py”, line 71, in active\_device  
Oct 13 06:26:23 kria python3[5548]: raise RuntimeError(“No Devices Found”)  
Oct 13 06:26:23 kria python3[5548]: RuntimeError: No Devices Found  
Oct 13 06:26:24 kria systemd[1]: fpga\_load.service: Main process exited, code=exited, status=1/FAILURE  
Oct 13 06:26:24 kria systemd[1]: fpga\_load.service: Failed with result ‘exit-code’.  
Oct 13 06:26:24 kria systemd[1]: Failed to start fpga\_load.service.  
Oct 13 06:26:24 kria systemd[1]: fpga\_load.service: Consumed 5.406s CPU time  
My fpga\_load.service process is in the attached file.  
[fpga\_load.service.txt](https://discuss.pynq.io/uploads/short-url/mXeykAO0T6EfGFskgogkVIZcFC6.txt) (507 Bytes)  
In fpga\_load.service.txt, in addition to a uint error, a warning that the device cannot be found appears. I tried to print the configuration information on the jupternotebook page, as shown in Figure 1.png

 ![1](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/8/85414aaa3a0cc1e6ff6cce780b843003c2ca135c.png)  
Xrt should have been successfully installed, but when calling overlay to load the bitstream file outside of jupternotebook, the device cannot be recognized. I checked the xrt installation directory and did not find xrt-info. Is it because this function package is missing during the installation process, or is xrt-info abandoned in the xrt2.13.479-0ubuntu2 version? The inability to recognize the device here is just an environment setting problem.  
thank you!

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [October 17, 2024, 4:35pm UTC](https://discuss.pynq.io/t/an-error-of-xrt-info/7617/2 "2024-10-17T16:35:52Z")

</div>

Hi @ctuglzh,

You need to source the venv from the terminal to get PYNQ.

> [@Pynq z2: no module named pynq](https://discuss.pynq.io/t/pynq-z2-no-module-named-pynq/5674/2):
>
> PYNQ is installed in a virtual environment. To run a Python script you need to source the virtual environment first: source /etc/profile.d/pynq\_venv.sh Cathal

Mario

---

<div class="post-metadata">

**Author:** ![ctuglzh](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@ctuglzh](https://discuss.pynq.io/u/ctuglzh)\
**Post date:** [October 18, 2024, 8:14am UTC](https://discuss.pynq.io/t/an-error-of-xrt-info/7617/3 "2024-10-18T08:14:18Z")

</div>

ok,thank you very much! I will try this method

---

<div class="post-metadata">

**Author:** ![ctuglzh](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@ctuglzh](https://discuss.pynq.io/u/ctuglzh)\
**Post date:** [October 18, 2024, 12:32pm UTC](https://discuss.pynq.io/t/an-error-of-xrt-info/7617/4 "2024-10-18T12:32:50Z")

</div>

Sorry to bother you again. After I executed source /etc/profile.d/pynq\_venv.sh, the previous problem has been solved, but new problems have arisen as follows:  
× fpga\_load.service - Load FPGA bitstream at startup  
Loaded: loaded (/etc/systemd/system/fpga\_load.service; disabled; vendor preset: enabled)  
Active: failed (Result: exit-code) since Thu 2024-10-17 11:54:35 UTC; 13s ago  
Process: 6821 ExecStart=/usr/bin/python3.10 -c from pynq import Overlay; overlay = Overlay(“/home/ubuntu/xilinx/work/case/mnist\_cnn/overlays/mnist\_cnn.bit”); print(“Bitstream loaded successfully”) \>\>\>  
Main PID: 6821 (code=exited, status=1/FAILURE)  
CPU: 524ms

Oct 17 11:54:34 kria systemd[1]: Starting Load FPGA bitstream at startup…  
Oct 17 11:54:35 kria python3.10[6821]: Traceback (most recent call last):  
Oct 17 11:54:35 kria python3.10[6821]: File “”, line 1, in   
Oct 17 11:54:35 kria python3.10[6821]: ModuleNotFoundError: No module named ‘pynq’  
Oct 17 11:54:35 kria systemd[1]: fpga\_load.service: Main process exited, code=exited, status=1/FAILURE  
Oct 17 11:54:35 kria systemd[1]: fpga\_load.service: Failed with result ‘exit-code’.  
Oct 17 11:54:35 kria systemd[1]: Failed to start Load FPGA bitstream at startup.  
I also modified the content of fpga\_load.service as follows:  
[Unit]  
Description=Load FPGA bitstream at startup  
After=network.target # 可根据实际需求修改

[Service]  
Type=oneshot # 表示服务只运行一次，完成加载后退出  
[Service]  
Type=oneshot  
ExecStart=/usr/bin/python3.10 -c ‘from pynq import Overlay; overlay = Overlay(“/home/ubuntu/xilinx/work/case/mnist\_cnn/overlays/mnist\_cnn.bit”); print(“Bitstream loaded successfully”)’ \>\> /var/log/fpga\_load.log 2\>&1  
RemainAfterExit=yes  
Change the previously used Python interpreter address pointing to the PYNQ installation directory to the actual Python interpreter address /usr/bin.python3.10. At the same time, I also checked the Python environment version installed on the system and the sys.path corresponding to the Python 3.10 interpreter. The results are as follows:  
pynq-venv) ubuntu@kria:/etc/systemd/system$ cd ~  
(pynq-venv) ubuntu@kria:~$ python3 -m pip show pynq  
Name: pynq  
Version: 3.0.1  
Summary: (PY)thon productivity for zy(NQ)  
Home-page: [GitHub - Xilinx/PYNQ: Python Productivity for ZYNQ](https://github.com/Xilinx/PYNQ)  
Author: Xilinx PYNQ Development Team  
Author-email: [pynq\_support@xilinx.com](mailto:pynq_support@xilinx.com)  
License: BSD 3-Clause  
Location: /usr/local/share/pynq-venv/lib/python3.10/site-packages  
Requires: cffi, nest-asyncio, numpy, pynqmetadata, pynqutils, setuptools  
Required-by: kv260, pynq-composable, pynq-dpu, pynq-peripherals  
(pynq-venv) ubuntu@kria:~$ python3 --version  
Python 3.10.12  
(pynq-venv) ubuntu@kria:~$ python3  
Python 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] on linux  
Type “help”, “copyright”, “credits” or “license” for more information.

> > > import sys  
> > > print(sys.path)  
> > > [‘’, ‘/home/ubuntu/kv260\_ros2\_node/dev\_ws/install/ps\_receive\_node/lib/python3.10/site-packages’, ‘/home/ubuntu/kv260\_ros2\_node/dev\_ws/install/mnist\_cnn\_interface/lib/python3.10/site-packages’, ‘/home/ubuntu/xilinx/work/dev\_ws/install/forest\_mnist\_cnn\_fpga\_node/lib/python3.10/site-packages’, ‘/home/ubuntu/xilinx/work/dev\_ws/install/forest\_mnist\_cnn\_interface/lib/python3.10/site-packages’, ‘/opt/ros/humble/lib/python3.10/site-packages’, ‘/opt/ros/humble/local/lib/python3.10/dist-packages’, ‘/usr/local/share/pynq-venv/lib/python3.10/site-packages’, ‘/usr/lib/python310.zip’, ‘/usr/lib/python3.10’, ‘/usr/lib/python3.10/lib-dynload’, ‘/usr/local/lib/python3.10/dist-packages’, ‘/usr/lib/python3/dist-packages’, ‘/usr/lib/python3.10/dist-packages’]  
> > > exit()  
> > > (pynq-venv) ubuntu@kria:~$  
> > > It seems that there shouldn’t be a problem with the PYNQ module not being recognized, but the problem still occurs！

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [October 21, 2024, 7:00am UTC](https://discuss.pynq.io/t/an-error-of-xrt-info/7617/5 "2024-10-21T07:00:21Z")

</div>

Hi @ctuglzh,

Can you please elaborate on what you’re trying to do?

Mario

---

<div class="post-metadata">

**Author:** ![ctuglzh](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@ctuglzh](https://discuss.pynq.io/u/ctuglzh)\
**Post date:** [October 22, 2024, 3:49am UTC](https://discuss.pynq.io/t/an-error-of-xrt-info/7617/6 "2024-10-22T03:49:51Z")

</div>

OK, Sorry to bother you again.I want to write a systemb-type fpga\_load.service process outside of jupternotebook to load the bitstream file when the system starts.

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [October 22, 2024, 1:54pm UTC](https://discuss.pynq.io/t/an-error-of-xrt-info/7617/7 "2024-10-22T13:54:59Z")

</div>

How far have you got?

---

<div class="post-metadata">

**Author:** ![ctuglzh](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@ctuglzh](https://discuss.pynq.io/u/ctuglzh)\
**Post date:** [October 23, 2024, 5:43am UTC](https://discuss.pynq.io/t/an-error-of-xrt-info/7617/8 "2024-10-23T05:43:04Z")

</div>

I implemented the writing of fpga\_load.service and ran fpga\_load.service in the pynq-venv environment. When running fpga\_load.service, the command: ExecStart=/usr/local/share/pynq-venv/bin/python3 -c from pynq import Overlay;  
overlay=Overlay(“/home/ubuntu/xilinx/work/case/mnist\_cnn/overlays/mnist\_cnn.bit”);  
print(“Bitstream loaded successfully”);  
At first, the XRT environment could not be recognized. I changed /usr/local/share/pynq-venv/bin/python3 to /usr/bin/python3.10. /usr/bin/python3.10 is the interpreter address actually pointed to by the python interpreter in the PYNQ virtual environment. When running, the XRT environment will not be unrecognizable, but the PYNQ module will not be recognized.  
Check the Ubuntu python version and whether the PYNQ module path is set correctly in the python interpreter environment. The output shows that the PYNQ module installation path has been set correctly.  
Is the failure to recognize the PYNQ module due to a certain environment setting? Can you provide some reference suggestions?

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [October 23, 2024, 7:18am UTC](https://discuss.pynq.io/t/an-error-of-xrt-info/7617/9 "2024-10-23T07:18:11Z")

</div>

Have you tried sourcing the pynq\_venv before executing your script?

```sh
ExecStart=source /etc/profile.d/pynq_venv.sh && python3 <path to python script>;

```

Also, are you specifying the user in the service? It should be root.

---

<div class="post-metadata">

**Author:** ![ctuglzh](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@ctuglzh](https://discuss.pynq.io/u/ctuglzh)\
**Post date:** [October 23, 2024, 12:07pm UTC](https://discuss.pynq.io/t/an-error-of-xrt-info/7617/10 "2024-10-23T12:07:02Z")

</div>

Thank you for your answer again. I tried to refer to your suggestion and added ‘source /etc/profile.d/pynq\_venv.sh’ before the ExecStart statement, but the problem still exists. I directly entered the root user mode in the bash shell, checked the address of the python interpreter when the virtual environment was not activated, activated the PYNQ virtual environment, and checked the address of the python interpreter again. The python interpreter was used to load the bitstream file, and the loading was successful. This shows that the error in the operation of load\_fpga.service should be a problem with the function content. I will continue to try. Thank you for your answer. I hope I can tell you my success next time.

 ![root_fpga_load](https://us1.discourse-cdn.com/flex019/uploads/pynq1/original/2X/9/9e434b3e7c8dc45008bdef474964dd6ad05fbbdf.png)

---

<div class="post-metadata">

**Author:** ![marioruiz](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/marioruiz/32/2177_2.png) [@marioruiz](https://discuss.pynq.io/u/marioruiz)\
**Post date:** [October 24, 2024, 7:43am UTC](https://discuss.pynq.io/t/an-error-of-xrt-info/7617/11 "2024-10-24T07:43:10Z")

</div>

We do have a service in all the PYNQ SD card images that downloads the base overlay.

This is achieved by these two files:

> <https://github.com/Xilinx/PYNQ/blob/master/sdbuild/packages/bootpy/bootpy.sh>

> <https://github.com/Xilinx/PYNQ/blob/master/sdbuild/packages/bootpy/bootpy.service>
