cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
794
Views
0
Helpful
2
Replies
abourges
Beginner

onepk 1.2/1.3 python mediatrace problem

Hi,

...I'm having trouble scripting a onepk mediatrace application. To get started I downloaded the latest (1.3) all-in-one-vm and looked at the mediatrace tutorial. Executing MediaTraceTutorial.py gives:

# ./MediaTraceTutorial.py
  File "./MediaTraceTutorial.py", line 49
    vty.write('conf t)
                     ^
SyntaxError: EOL while scanning string literal

=> so I fixed that missing single-quote and tried again:

$ ./MediaTraceTutorial.py
Traceback (most recent call last):
  File "./MediaTraceTutorial.py", line 16, in <module>
    from onep.vty import VtyService
  File "/usr/local/lib/python2.7/dist-packages/onep/vty/__init__.py", line 11, in <module>
    from onep.vty.VtyService import VtyService
  File "/eem-5/shr_scratch/build/nightly/sdk_1.3-nightly/latest/infra/onep/presentation/python/pkg_rel/onep/vty/VtyService.py", line 15, in <module>
ImportError: No module named Shared.ttypes
cisco@onepk:~/onePK-sdk-1.3.0.181/python/tutorials/mediatrace$

=> this very same problem can be found in onepk 1.2 SDK

...is there an easy way to fix that ?

Thanks,

Andy

1 ACCEPTED SOLUTION

Accepted Solutions
miott
Cisco Employee

These problems have been fixed but the SDK somehow got an in-between version of the tutorial.  Make this import the first one and that will fix it.

from onep.element import NetworkElement

View solution in original post

2 REPLIES 2
miott
Cisco Employee

These problems have been fixed but the SDK somehow got an in-between version of the tutorial.  Make this import the first one and that will fix it.

from onep.element import NetworkElement

View solution in original post

Michael,

...that fixed the problem Mediatrace.py now works - still have

some trouble with my own application, but that's another problem

Thanks for your prompt reply!

Create
Recognize Your Peers
Content for Community-Ad