08-29-2016 11:20 AM
I was able to get YDK-gen to build my SDK based on YANG models. I'm doing a simple test and I just want YDK to spit out the XML. This gives tracebacks...
from ydk.models.cisco_customer import Data
from ydk.services import CodecService
from ydk.providers import NetconfServiceProvider
myservice = CodecService()
myprovider = NetconfServiceProvider()
foo = Data()
cust = foo.Customer()
cust.name = "Bill"
print(myservice.encode(myprovider, foo))
C:\Users\brfoster\virtualenvs\epnm_testing\Scripts\python.exe C:/Users/brfoster/PycharmProjects/EPNM/tests/testydk.py
Traceback (most recent call last):
File "C:/Users/brfoster/PycharmProjects/EPNM/tests/testydk.py", line 2, in <module>
from ydk.models.cisco_customer import Data
File "C:\Users\brfoster\virtualenvs\epnm_testing\lib\site-packages\ydk\models\cisco_customer.py", line 15, in <module>
from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict
File "C:\Users\brfoster\virtualenvs\epnm_testing\lib\site-packages\ydk\types.py", line 23, in <module>
from builtins import str
ImportError: No module named builtins
Solved! Go to Solution.
08-29-2016 11:36 AM
Hi Jonathan,
We recently added support for python3, which initially introduced a dependency on the future package. We are currently working to remove this dependency, but for the time being, please install the future package https://pypi.python.org/pypi/future.
08-29-2016 11:36 AM
Hi Jonathan,
We recently added support for python3, which initially introduced a dependency on the future package. We are currently working to remove this dependency, but for the time being, please install the future package https://pypi.python.org/pypi/future.
08-29-2016 02:39 PM
That fixed it, thanks!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide