2016-09-16 4 views
1

이 질문은 @Maciej Lach에 관한 것이지만이 문제를 경험 한 사람이 있으면 알려주십시오.null 문자가있는 문제는 kdb에서 qpython/pandas가 수신했습니다.

문제는 간단합니다. kdb가 열 중 하나에 빈 문자가있는 단일 행 테이블을 보낼 때마다 qpyhton이 충돌합니다 (pandas가 true로 설정된 경우).

내가 사용하고 있습니다 : 파이썬 버전 2.7.11, qpython 버전 qPython-1.2.0, 팬더-0.18.1

재현하려면 :

from qpython import qconnection 

q = qconnection.QConnection(pandas = True, host = 'myhost', port = myport) 

print 'initiating connection(s)' 
q.open() 

while True: 
    msg = q.receive(data_only = True, raw = False) 
    print 'message received' 

이제, 산업 은행 측 :

/send a table (which just so happens to have blank/null chars) 
neg[4](`upd;`trade;([] col1:`a`b`c;col2:" a")) 
/no problem 

/send last row of that table 
neg[4](`upd;`trade;-1#([] col1:`a`b`c;col2:" a")) 
/no problem 

/send two rows (2 blank chars) 
neg[4](`upd;`trade;2#([] col1:`a`b`c;col2:" a")) 
/no problem 

/send first row of that table (one blank char) 
neg[4](`upd;`trade;1#([] col1:`a`b`c;col2:" a")) 
/crashes with error "AttributeError: 'float' object has no attribute 'meta'" 

null 문자가있는 단일 행 테이블을 보낼 때만 문제가있는 것처럼 보입니다. 두 개 이상의 null 문자가 있으면 문제가 없습니다. null이 아닌 문자가있는 단일 행 테이블을 사용하면 문제가 없습니다. 그리고 Pandas = True 옵션을 사용하지 않고도 문제가 없습니다 (그러나 유스 케이스에는 pandas = True가 필요합니다).

아이디어가 있으십니까?

답변

2

이것은 qPython 라이브러리의 < 1.2.1 버전의 버그입니다.

나는 관리자에게 수정 된 내용의 pull request에 기여했습니다.

+0

찬란한, 다시 한 번 감사드립니다. – terrylynch