sysrepo / sysrepo-python

Python bindings for sysrepo
BSD 3-Clause "New" or "Revised" License
27 stars 21 forks source link

Unable to run application.py #24

Closed xscchoux closed 2 years ago

xscchoux commented 2 years ago

Hi,

I tried to run application.py on my Linux system. For the first time I ran it, I did not see the error message below. This happens when I reconnect to my Linux system and try to make it run again:

root@f15f02d72537:/sysrepo-python/examples# python3 application.py
Namespace(verbose=0) 0
[ERROR] application: Operational data provider subscription for "sysrepo-example" on "/sysrepo-example:state" already exists.
[ERROR] application: Operational data provider subscription for "sysrepo-example" on "/sysrepo-example:state" already exists.: Invalid argument

And there are no other running jobs in background. root@f15f02d72537:/sysrepo-python/examples# jobs

I tried to uninstall sysrepo-example, but I failed.

root@f15f02d72537:/sysrepo-python/examples# python3 sysrepoctl.py -u sysrepo-example
[ERROR] sysrepoctl.py: Module "sysrepo-example" already scheduled for deletion.
[ERROR] sysrepoctl.py: sr_remove_module failed: Item already exists

Does anyone know how to make application.py run again in this situation?

rjarry commented 2 years ago

Hi

These error messages are from libsysrepo.so. They should be pretty self explanatory.

these scripts are only examples on how to use the python bindings. If you need some introduction on how sysrepo works, please read the official documentation.

https://netopeer.liberouter.org/doc/sysrepo/master/html/index.html https://netopeer.liberouter.org/doc/sysrepo/master/html/sysrepoctl.html https://netopeer.liberouter.org/doc/sysrepo/master/html/sysrepocfg.html

xscchoux commented 2 years ago

Hi rjarry,

Thanks for your reply. The issue is now fixed.