KxSystems / pyq

PyQ — Python for kdb+
http://code.kx.com/q/interfaces
Apache License 2.0
191 stars 49 forks source link

_k.error: scov on pyq start #121

Closed kgang closed 4 years ago

kgang commented 4 years ago

Questions

Steps to reproduce the issue

pip install pyq pyq

Expected result

Python terminal prompt

Actual result


Traceback (most recent call last):
  File "", line 1, in 
  File "/home/kgang/.local/lib/python3.7/site-packages/pyq/__init__.py", line 733, in 
    q = _Q()
  File "/home/kgang/.local/lib/python3.7/site-packages/pyq/__init__.py", line 701, in __init__
    [name for name, _ in _q_builtins()])
  File "/home/kgang/.local/lib/python3.7/site-packages/pyq/__init__.py", line 634, in _q_builtins
    pairs.append((attr, q(x)))
  File "/home/kgang/.local/lib/python3.7/site-packages/pyq/__init__.py", line 614, in q
    return K._k(0, x)
_k.error: scov
'2019.09.13T11:14:27.195 python
@
"k"
"p)from pyq import q"
kgang commented 4 years ago

Looks like our version of kdb (3.1) was too old to have scov, svar, so just deleted those imports from the init.py file.

sashkab commented 4 years ago

I don't think we test with 3.1, as this version is somewhat old. But thanks for your report and the workaround. We will try to add support in future version.

sashkab commented 4 years ago

internal issue 1054.

sashkab commented 4 years ago

This has been resolved internally. Expected fix will be released in PyQ 5.0.

perfecto25 commented 4 years ago

Just adding in case anyone hits this issue running KDB 3.1

all you need to do is adjust this line for version import,

vi /home/user/py3/lib64/python3.6/site-packages/pyq/__init__.py

#line 624
# change kver to 3.2

    if kver < 3.2:
        for new in ['scov', 'svar', 'sdev']:
            names.remove(new)