

supersaiyanraj
Forum Replies Created
-
supersaiyanraj
MemberFebruary 8, 2024 at 12:00 am in reply to: PyKX could not establish an IPC connection in the Flask appHello ,I tried the same with both pykx 2.2.0 /2.3.0 , python 3.10.9 , Flask 3.0.2, I can’t able to connect with port 5000.
from flask import Flask import pykx as kx import json as j app = Flask(__name__) @app.route("/") def hello_kx(): import pykx as kx qcon=kx.QConnection(host='localhost', port=5000) tables=qcon("tables[]").py() import json as j print(j.dumps(ports)) return tables if __name__ == '__main__': app.run(host='127.0.0.1', debug=True, port=8100)
I got this error:
if q(‘{.pykx.util.isw x}’, self).py():
File “/rxds/rxds_offerings/datagen/env/lib/python3.10/site-packages/pykx/embedded_q.py”, line 226, in __call__return factory(result, False)
File “pykx/_wrappers.pyx”, line 507, in pykx._wrappers._factory
File “pykx/_wrappers.pyx”, line 500, in pykx._wrappers.factory
pykx.exceptions.QError: .pykx.util.isw
the same code I just run python without flask it return values.
import pykx as kx import json def hello_kx(): qcon=kx.QConnection(host='localhost', port=5000) tables=qcon("tables[]").py() import json return json.dumps(tables) a=hello_kx() print(a)
-
supersaiyanraj
MemberNovember 15, 2023 at 12:00 am in reply to: PyKX could not establish an IPC connection in the Flask appI tried in pykx 1.6.3
pip list | grep pykx
pykx 1.6.3
after updated the package into 2.2.0 – It make a IPC connection, Thanks a lot.
-
Thank you so much David for the link.
-
Hi @PCarroll,
I think same, it might be a some permission issues for accessing s3 bucket.1. Yes, I copied the table to s3 with outside of q prompt.
2. I can load the table from my local. But, I get the error when I try to load the same table from my s3.Thanks for your response!