cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
723
Views
3
Helpful
3
Replies

Error Running YDK

brfoster
Cisco Employee
Cisco Employee

I have set up a new YDK 0.4.2 environment and I am trying to run the sample YDK python script.  I'm seeing an error...

(ydk-py) [gibson@rickenbacker ydk-py]$ python2.7 ./samples/bgp.py -h

Traceback (most recent call last):

  File "./samples/bgp.py", line 32, in <module>

    from ydk.models.bgp.bgp_types import Ipv4Unicast_Identity

ImportError: cannot import name Ipv4Unicast_Identity

After inspecting the bgp_types.py file I can see that Ipv4Unicast_Identity *should be* Ipv4UnicastIdentity (no underscore).

Now it runs fine...

(ydk-py) [gibson@rickenbacker ydk-py]$ python2.7 ./samples/bgp.py -h

Usage: bgp.py [-h | --help] [options]

Options:

  -h, --help            show this help message and exit

  -v VERSION, --version=VERSION

                        force NETCONF version 1.0 or 1.1

  -u USERNAME, --user=USERNAME

  -p PASSWORD, --password=PASSWORD

                        password

  --proto=PROTO         Which transport protocol to use, one of ssh or tcp

  --host=HOST           NETCONF agent hostname

  --port=PORT           NETCONF agent SSH port

1 Accepted Solution

Accepted Solutions

abhirame
Cisco Employee
Cisco Employee

Thanks. Both the above issues have been fixed

View solution in original post

3 Replies 3

abhirame
Cisco Employee
Cisco Employee

Thanks for letting us know about this . This sample will be fixed to remove this error.

Also Ipv6Unicast_Identity should be Ipv6UnicastIdentity.

abhirame
Cisco Employee
Cisco Employee

Thanks. Both the above issues have been fixed