I have installed the server, everything was working until I decided to debug a file.
Here’s the file (it’s just connecting to the server and printing a result of a query)
from ast import Pass
from datetime import timedelta
from couchbase.auth import PasswordAuthenticator
from couchbase.cluster import Cluster
from couchbase.options import ClusterTimeoutOptions,ClusterOptions
from couchbase.exceptions import CouchbaseException
from bunch_funcs import get_docs_ids
#cluster = Cluster.connect("couchbase://localhost", ClusterOptions(PasswordAuthenticator("", "")))
USERNAME=""
PASSWORD=""
BUCKET_NAME="companies_data"
auth=PasswordAuthenticator(USERNAME,PASSWORD)
cluster=Cluster(
'couchbase://127.0.0.1',
ClusterOptions(auth)
)
bucket=cluster.bucket(BUCKET_NAME)
collection=bucket.default_collection()
id=get_docs_ids()[0]
#query="SELECT founded_year FROM `companies_data`._default._default WHERE _id="+id
# #resultat=cluster.query(query)
# for row in resultat.rows():
# print(row['_id']+'he')
query="SELECT founded_year FROM `companies_data`._default._default WHERE _id="+"'"+id+"'"
resultat=cluster.query(query)
for row in resultat.rows():
print(row['founded_year'])
Hi @rafik.hammoutene - What operating system are you using? Typically this issue is seen when OpenSSL 1.1 is not installed. It is a requirement for the SDK (mentioned in the installation docs). Can you confirm you have OpenSSL installed? Should be able to run the following and see similar output.
$ openssl version -a
OpenSSL 1.1.1s 1 Nov 2022 (Library: OpenSSL 1.1.1q 5 Jul 2022)
built on: Tue Jul 5 09:08:33 2022 UTC
platform: darwin64-arm64-cc
options: bn(64,64) rc4(int) des(int) idea(int) blowfish(ptr)
compiler: clang -fPIC -arch arm64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DVPAES_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -D_REENTRANT -DNDEBUG
OPENSSLDIR: "/opt/homebrew/etc/openssl@1.1"
ENGINESDIR: "/opt/homebrew/Cellar/openssl@1.1/1.1.1q/lib/engines-1.1"
Seeding source: os-specific
Also, for reference, we provide some Dockerfiles as a guideline to installation on various platforms. See Dockerfiles here.