cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3076
Views
15
Helpful
6
Replies

NSO: Something wrong with Python process. dlopen, Symbol not found: _PyIOBase_Type

bfinnema
Cisco Employee
Cisco Employee

When installing NSO 5.3.1.1 on my Mac, and running a service, i get this:

admin@ncs(config-my_test-TEST1)# commit dry-run outformat xml                                      
Aborted: no registration found for callpoint my_test-servicepoint/service_create of type=external

Packages oper-status. Python is not initialized for the my_test package.

admin@ncs# show packages package oper-status
                                                                                                        PACKAGE                
                          PROGRAM                                                                       META     FILE          
                          CODE     JAVA           PYTHON         BAD NCS  PACKAGE  PACKAGE  CIRCULAR    DATA     LOAD   ERROR  
NAME                  UP  ERROR    UNINITIALIZED  UNINITIALIZED  VERSION  NAME     VERSION  DEPENDENCY  ERROR    ERROR  INFO   
-------------------------------------------------------------------------------------------------------------------------------
cisco-ios-cli-6.51    X   -        -              -              -        -        -        -           -        -      -      
cisco-iosxr-cli-7.24  X   -        -              -              -        -        -        -           -        -      -      
my_test               -   -        -              X              -        -        -        -           -        -      -      

Checking the python log:

user@{my-mac} logs % cat ncs-python-vm.log 
<INFO> 15-Apr-2020::09:41:30.833 {my-mac} ncs[8715]: Started PyVM: <<"my_test">> , Port=#Port<0.11339> , OSpid="8807"
<INFO> 15-Apr-2020::09:41:31.089 {my-mac} ncs[8715]: my_test :: Starting python3 -u /Users/user/tail-f/./nso-5.3.1.1/src/ncs/pyapi/ncs_pyvm/startup.py -l info -f ./logs/ncs-python-vm -i my_test
<INFO> 15-Apr-2020::09:41:31.464 {my-mac} ncs[8715]: my_test :: Traceback (most recent call last):
  File "/Users/user/tail-f/./nso-5.3.1.1/src/ncs/pyapi/ncs_pyvm/startup.py", line 6, in <module>
<INFO> 15-Apr-2020::09:41:31.464 {my-mac} ncs[8715]: my_test ::     import ncsctlsock
  File "/Users/user/tail-f/nso-5.3.1.1/src/ncs/pyapi/ncs_pyvm/ncsctlsock.py", line 5, in <module>
<INFO> 15-Apr-2020::09:41:31.464 {my-mac} ncs[8715]: my_test ::     import _ncs
  File "/Users/user/tail-f/nso-5.3.1.1/src/ncs/pyapi/_ncs/__init__.py", line 19, in <module>
<INFO> 15-Apr-2020::09:41:31.464 {my-mac} ncs[8715]: my_test ::     from ._ncs_py3 import cdb
ImportError: dlopen(/Users/user/tail-f/nso-5.3.1.1/src/ncs/pyapi/_ncs/_ncs_py3.abi3.so, 2): Symbol not found: _PyIOBase_Type
  Referenced from: /Users/user/tail-f/nso-5.3.1.1/src/ncs/pyapi/_ncs/_ncs_py3.abi3.so
  Expected in: flat namespace
 in /Users/user/tail-f/nso-5.3.1.1/src/ncs/pyapi/_ncs/_ncs_py3.abi3.so
<INFO> 15-Apr-2020::09:41:31.468 {my-mac} ncs[8715]: Got EXIT on Port= #Port<0.11339>
<INFO> 15-Apr-2020::09:41:31.475 {my-mac} ncs[8715]: Restarted PyVM: <<"my_test">> , Port=#Port<0.12897> , OSpid="8816"
<INFO> 15-Apr-2020::09:41:31.482 {my-mac} ncs[8715]: my_test :: Starting python3 -u /Users/user/tail-f/./nso-5.3.1.1/src/ncs/pyapi/ncs_pyvm/startup.py -l info -f ./logs/ncs-python-vm -i my_test
<INFO> 15-Apr-2020::09:41:31.534 {my-mac} ncs[8715]: my_test :: Traceback (most recent call last):
  File "/Users/user/tail-f/./nso-5.3.1.1/src/ncs/pyapi/ncs_pyvm/startup.py", line 6, in <module>
<INFO> 15-Apr-2020::09:41:31.534 {my-mac} ncs[8715]: my_test ::     import ncsctlsock
  File "/Users/user/tail-f/nso-5.3.1.1/src/ncs/pyapi/ncs_pyvm/ncsctlsock.py", line 5, in <module>
<INFO> 15-Apr-2020::09:41:31.534 {my-mac} ncs[8715]: my_test ::     import _ncs
  File "/Users/user/tail-f/nso-5.3.1.1/src/ncs/pyapi/_ncs/__init__.py", line 19, in <module>
<INFO> 15-Apr-2020::09:41:31.534 {my-mac} ncs[8715]: my_test ::     from ._ncs_py3 import cdb
ImportError: dlopen(/Users/user/tail-f/nso-5.3.1.1/src/ncs/pyapi/_ncs/_ncs_py3.abi3.so, 2): Symbol not found: _PyIOBase_Type
  Referenced from: /Users/user/tail-f/nso-5.3.1.1/src/ncs/pyapi/_ncs/_ncs_py3.abi3.so
  Expected in: flat namespace
 in /Users/user/tail-f/nso-5.3.1.1/src/ncs/pyapi/_ncs/_ncs_py3.abi3.so
<INFO> 15-Apr-2020::09:41:31.538 {my-mac} ncs[8715]: Got EXIT on Port= #Port<0.12897>

What does "Symbol not found: _PyIOBase_Type" mean? How can I fix it?

I have had several versions of NSO running on my Mac(s), but never seen this before.

I recently got a new Mac, and to begin with NSO 5.2.1 was running fine on that new Mac. But now I have this issue with 5.2.1 and 5.3.1.1. Have I messed up the Python installation on my Mac or the $PATH or....?

Python seems good:

# ncs-run % python --version
Python 3.7.3
# ncs-run % python2 --version
Python 2.7.16
# ncs-run % python3 --version
Python 3.7.3

I have Java installed, I have paramiko..What is missing?

 

1 Accepted Solution

Accepted Solutions

perander
Cisco Employee
Cisco Employee

This is an issue with the NSO Python API since Python 3 removed PyObject PyIOBase_Type.

It is fixed in NSO-5.3.4.

View solution in original post

6 Replies 6

asandore
Cisco Employee
Cisco Employee

Did you ever solve this problem? I'm facing the same issue

 

I have python2 and python3 installed on my mac, output:

 

$ python --version

Python 2.7.17

$ python2 --version

Python 2.7.17

$ python3 --version

Python 3.7.3

gschudel
Cisco Employee
Cisco Employee

on the Mac, install "homebrew" and use "brew install python" (which does both python2 and python3)...
and then try again...

(Mac seems to put (natively) python in non-standard locations... Brew seems to resolve this... I ran into this on Catalina a week ago - the above was _all_ i needed to do...)

Even doing brew install python didn't solve the issue.

 

On package reload, I still see  

 

I am getting this specific issue with NFVO package?

any further suggestions? 

I had to fully uninstall python3 and reinstall

uwankhed
Cisco Employee
Cisco Employee

I had this error in my local nso install on mac after I upgraded to Monterey. None of the above posted options worked for me. I had to reinstall NSO to make it work.

perander
Cisco Employee
Cisco Employee

This is an issue with the NSO Python API since Python 3 removed PyObject PyIOBase_Type.

It is fixed in NSO-5.3.4.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: