Could Not Connect to Hyperledger Indy Test Pool via Python Wrapper – Error: indy.dll not found

  Kiến thức lập trình

I am trying to create and connect to a local Indy test ledger using the Docker image file from the indy-sdk repository. However, my Python code is giving the error: '_load_cdll: Can't load libindy: Could not find module 'indy.dll' (or one of its dependencies). I also provide the whole error text below. I am really new to Hyperledger Identity Stack, I would be grateful for any help.

I pursue the following steps to create and connect to my local Indy ledger.
I cloned indy-sdk repository from GitHub then ran the docker image as follows:

Cloning the repository:

C:UsersOnurDesktopindyy>git clone https://github.com/hyperledger-archives/indy-sdk.git

Navigating to repository folder indy-sdk

C:UsersOnurDesktopindyy>cd indy-sdk

Building image from docker file:

C:UsersOnurDesktopindyyindy-sdk>docker build -f ci/indy-pool.dockerfile -t indy_pool .

Output:

[+] Building 2.3s (15/15) FINISHED => [internal] load build
definition from indy-pool.dockerfile
0.0s => => transferring dockerfile: 42B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/ubuntu:16.04 2.1s => [ 1/11] FROM docker.io/library/ubuntu:16.04@sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6f 0.0s => CACHED [ 2/11] RUN apt-get update -y && apt-get install -y git wget python3.5 python3-pip python-setupto 0.0s => CACHED [
3/11] RUN pip3 install -U pip==9.0.3 setuptools
0.0s => CACHED [ 4/11] RUN apt-key adv –keyserver keyserver.ubuntu.com –recv-keys CE7709D068DB5E88 || apt-key adv
0.0s => CACHED [ 5/11] RUN echo “deb https://repo.sovrin.org/deb xenial master” >> /etc/apt/sources.list 0.0s => CACHED
[ 6/11] RUN useradd -ms /bin/bash -u 1000 indy
0.0s => CACHED [ 7/11] RUN apt-get update -y && apt-get install -y python3-pyzmq=18.1.0 indy-plenum=1 0.0s => CACHED [ 8/11]
RUN echo “[supervisord]nlogfile =
/tmp/supervisord.lognlogfile_maxbytes = 50MBnlogfile_back 0.0s =>
CACHED [ 9/11] RUN awk ‘{if (index($1, “NETWORK_NAME”) != 0)
{print(“NETWORK_NAME = “sandbox””)} else print 0.0s => CACHED
[10/11] RUN mv /tmp/indy_config.py /etc/indy/indy_config.py
0.0s => CACHED [11/11] RUN generate_indy_pool_transactions –nodes 4 –clients 5 –nodeNum 1 2 3 4 –ips=”127.0.0.1,1 0.0s => exporting to image
0.1s => => exporting layers 0.0s => => writing image sha256:ffd02987dfcc40a8ff7b8999e3b6453f753ec67f5ab693b9d7437492aa366dbb
0.0s => => naming to docker.io/library/indy_pool 0.0s

Use ‘docker scan’ to run Snyk tests against images to find
vulnerabilities and learn how to fix them

Running the container:

C:UsersOnurDesktopindyyindy-sdk>docker run -itd -p 9701-9708:9701-9708 indy_pool
3fc216ca3e59687a87f203ac3f58dd285c7bbd47e0fac1c361e636cd555c1957



C:UsersOnurDesktopindyyindy-sdk>docker ps
CONTAINER ID   IMAGE       COMMAND                  CREATED          STATUS          PORTS                              NAMES
3fc216ca3e59   indy_pool   "/usr/bin/supervisord"   44 seconds ago   Up 41 seconds   0.0.0.0:9701-9708->9701-9708/tcp   hopeful_boyd

C:UsersOnurDesktopindyyindy-sdk>docker exec -it 3fc216ca3e59 bash
indy@3fc216ca3e59:/$ cat /var/lib/indy/sandbox/
data/                        node1_info.json              node2_version_info.json      node4_additional_info.json
domain_transactions_genesis  node1_version_info.json      node3_additional_info.json   node4_info.json
keys/                        node2_additional_info.json   node3_info.json              node4_version_info.json
node1_additional_info.json   node2_info.json              node3_version_info.json      pool_transactions_genesis


indy@3fc216ca3e59:/$ cat /var/lib/indy/sandbox/pool_transactions_genesis

{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node1","blskey":"4N8aUNHSgjQVgkpm8nhNEfDf6txHznoYREg9kirmJrkivgL4oSEimFF6nsQ6M41QvhM2Z33nves5vfSn9n1UwNFJBYtWVnHYMATn76vLuL3zU88KyeAYcHfsih3He6UHcXDxcaecHVz6jhCYz1P2UZn2bDVruL5wXpehgBfBaLKm3Ba","blskey_pop":"RahHYiCvoNCtPTrVtP7nMC5eTYrsUA8WjXbdhNc8debh1agE9bGiJxWBXYNFbnJXoXhWFMvyqhqhRoq737YQemH5ik9oL7R4NTTCz2LEZhkgLJzB3QRQqJyBNyv7acbdHrAT8nQ9UkLbaVL9NBpnWXBTw4LEMePaSHEw66RzPNdAX1","client_ip":"127.0.0.1","client_port":9702,"node_ip":"127.0.0.1","node_port":9701,"services":["VALIDATOR"]},"dest":"Gw6pDLhcBcoQesN72qfotTgFa7cbuqZpkX3Xo6pLhPhv"},"metadata":{"from":"Th7MpTaRZVRYnPiabds81Y"},"type":"0"},"txnMetadata":{"seqNo":1,"txnId":"fea82e10e894419fe2bea7d96296a6d46f50f93f9eeda954ec461b2ed2950b62"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node2","blskey":"37rAPpXVoxzKhz7d9gkUe52XuXryuLXoM6P6LbWDB7LSbG62Lsb33sfG7zqS8TK1MXwuCHj1FKNzVpsnafmqLG1vXN88rt38mNFs9TENzm4QHdBzsvCuoBnPH7rpYYDo9DZNJePaDvRvqJKByCabubJz3XXKbEeshzpz4Ma5QYpJqjk","blskey_pop":"Qr658mWZ2YC8JXGXwMDQTzuZCWF7NK9EwxphGmcBvCh6ybUuLxbG65nsX4JvD4SPNtkJ2w9ug1yLTj6fgmuDg41TgECXjLCij3RMsV8CwewBVgVN67wsA45DFWvqvLtu4rjNnE9JbdFTc1Z4WCPA3Xan44K1HoHAq9EVeaRYs8zoF5","client_ip":"127.0.0.1","client_port":9704,"node_ip":"127.0.0.1","node_port":9703,"services":["VALIDATOR"]},"dest":"8ECVSk179mjsjKRLWiQtssMLgp6EPhWXtaYyStWPSGAb"},"metadata":{"from":"EbP4aYNeTHL6q385GuVpRV"},"type":"0"},"txnMetadata":{"seqNo":2,"txnId":"1ac8aece2a18ced660fef8694b61aac3af08ba875ce3026a160acbc3a3af35fc"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node3","blskey":"3WFpdbg7C5cnLYZwFZevJqhubkFALBfCBBok15GdrKMUhUjGsk3jV6QKj6MZgEubF7oqCafxNdkm7eswgA4sdKTRc82tLGzZBd6vNqU8dupzup6uYUf32KTHTPQbuUM8Yk4QFXjEf2Usu2TJcNkdgpyeUSX42u5LqdDDpNSWUK5deC5","blskey_pop":"QwDeb2CkNSx6r8QC8vGQK3GRv7Yndn84TGNijX8YXHPiagXajyfTjoR87rXUu4G4QLk2cF8NNyqWiYMus1623dELWwx57rLCFqGh7N4ZRbGDRP4fnVcaKg1BcUxQ866Ven4gw8y4N56S5HzxXNBZtLYmhGHvDtk6PFkFwCvxYrNYjh","client_ip":"127.0.0.1","client_port":9706,"node_ip":"127.0.0.1","node_port":9705,"services":["VALIDATOR"]},"dest":"DKVxG2fXXTU8yT5N7hGEbXB3dfdAnYv1JczDUHpmDxya"},"metadata":{"from":"4cU41vWW82ArfxJxHkzXPG"},"type":"0"},"txnMetadata":{"seqNo":3,"txnId":"7e9f355dffa78ed24668f0e0e369fd8c224076571c51e2ea8be5f26479edebe4"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node4","blskey":"2zN3bHM1m4rLz54MJHYSwvqzPchYp8jkHswveCLAEJVcX6Mm1wHQD1SkPYMzUDTZvWvhuE6VNAkK3KxVeEmsanSmvjVkReDeBEMxeDaayjcZjFGPydyey1qxBHmTvAnBKoPydvuTAqx5f7YNNRAdeLmUi99gERUU7TD8KfAa6MpQ9bw","blskey_pop":"RPLagxaR5xdimFzwmzYnz4ZhWtYQEj8iR5ZU53T2gitPCyCHQneUn2Huc4oeLd2B2HzkGnjAff4hWTJT6C7qHYB1Mv2wU5iHHGFWkhnTX9WsEAbunJCV2qcaXScKj4tTfvdDKfLiVuU2av6hbsMztirRze7LvYBkRHV3tGwyCptsrP","client_ip":"127.0.0.1","client_port":9708,"node_ip":"127.0.0.1","node_port":9707,"services":["VALIDATOR"]},"dest":"4PS3EDQ3dW1tci1Bp6543CfuuebjFrg36kLAUcskGfaA"},"metadata":{"from":"TWwCRQRZ2ZHMJFn9TzLp7W"},"type":"0"},"txnMetadata":{"seqNo":4,"txnId":"aa5e817d7cc626170eca175822029339a444eb0ee8f0bd20d3b0b76e566fb008"},"ver":"1"}
indy@3fc216ca3e59:/$

Then, I copied the genesis content and pasted it into my pool1.txn file in VSCode. Here is the content of pool1.txn file:

{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node1","blskey":"4N8aUNHSgjQVgkpm8nhNEfDf6txHznoYREg9kirmJrkivgL4oSEimFF6nsQ6M41QvhM2Z33nves5vfSn9n1UwNFJBYtWVnHYMATn76vLuL3zU88KyeAYcHfsih3He6UHcXDxcaecHVz6jhCYz1P2UZn2bDVruL5wXpehgBfBaLKm3Ba","blskey_pop":"RahHYiCvoNCtPTrVtP7nMC5eTYrsUA8WjXbdhNc8debh1agE9bGiJxWBXYNFbnJXoXhWFMvyqhqhRoq737YQemH5ik9oL7R4NTTCz2LEZhkgLJzB3QRQqJyBNyv7acbdHrAT8nQ9UkLbaVL9NBpnWXBTw4LEMePaSHEw66RzPNdAX1","client_ip":"127.0.0.1","client_port":9702,"node_ip":"127.0.0.1","node_port":9701,"services":["VALIDATOR"]},"dest":"Gw6pDLhcBcoQesN72qfotTgFa7cbuqZpkX3Xo6pLhPhv"},"metadata":{"from":"Th7MpTaRZVRYnPiabds81Y"},"type":"0"},"txnMetadata":{"seqNo":1,"txnId":"fea82e10e894419fe2bea7d96296a6d46f50f93f9eeda954ec461b2ed2950b62"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node2","blskey":"37rAPpXVoxzKhz7d9gkUe52XuXryuLXoM6P6LbWDB7LSbG62Lsb33sfG7zqS8TK1MXwuCHj1FKNzVpsnafmqLG1vXN88rt38mNFs9TENzm4QHdBzsvCuoBnPH7rpYYDo9DZNJePaDvRvqJKByCabubJz3XXKbEeshzpz4Ma5QYpJqjk","blskey_pop":"Qr658mWZ2YC8JXGXwMDQTzuZCWF7NK9EwxphGmcBvCh6ybUuLxbG65nsX4JvD4SPNtkJ2w9ug1yLTj6fgmuDg41TgECXjLCij3RMsV8CwewBVgVN67wsA45DFWvqvLtu4rjNnE9JbdFTc1Z4WCPA3Xan44K1HoHAq9EVeaRYs8zoF5","client_ip":"127.0.0.1","client_port":9704,"node_ip":"127.0.0.1","node_port":9703,"services":["VALIDATOR"]},"dest":"8ECVSk179mjsjKRLWiQtssMLgp6EPhWXtaYyStWPSGAb"},"metadata":{"from":"EbP4aYNeTHL6q385GuVpRV"},"type":"0"},"txnMetadata":{"seqNo":2,"txnId":"1ac8aece2a18ced660fef8694b61aac3af08ba875ce3026a160acbc3a3af35fc"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node3","blskey":"3WFpdbg7C5cnLYZwFZevJqhubkFALBfCBBok15GdrKMUhUjGsk3jV6QKj6MZgEubF7oqCafxNdkm7eswgA4sdKTRc82tLGzZBd6vNqU8dupzup6uYUf32KTHTPQbuUM8Yk4QFXjEf2Usu2TJcNkdgpyeUSX42u5LqdDDpNSWUK5deC5","blskey_pop":"QwDeb2CkNSx6r8QC8vGQK3GRv7Yndn84TGNijX8YXHPiagXajyfTjoR87rXUu4G4QLk2cF8NNyqWiYMus1623dELWwx57rLCFqGh7N4ZRbGDRP4fnVcaKg1BcUxQ866Ven4gw8y4N56S5HzxXNBZtLYmhGHvDtk6PFkFwCvxYrNYjh","client_ip":"127.0.0.1","client_port":9706,"node_ip":"127.0.0.1","node_port":9705,"services":["VALIDATOR"]},"dest":"DKVxG2fXXTU8yT5N7hGEbXB3dfdAnYv1JczDUHpmDxya"},"metadata":{"from":"4cU41vWW82ArfxJxHkzXPG"},"type":"0"},"txnMetadata":{"seqNo":3,"txnId":"7e9f355dffa78ed24668f0e0e369fd8c224076571c51e2ea8be5f26479edebe4"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node4","blskey":"2zN3bHM1m4rLz54MJHYSwvqzPchYp8jkHswveCLAEJVcX6Mm1wHQD1SkPYMzUDTZvWvhuE6VNAkK3KxVeEmsanSmvjVkReDeBEMxeDaayjcZjFGPydyey1qxBHmTvAnBKoPydvuTAqx5f7YNNRAdeLmUi99gERUU7TD8KfAa6MpQ9bw","blskey_pop":"RPLagxaR5xdimFzwmzYnz4ZhWtYQEj8iR5ZU53T2gitPCyCHQneUn2Huc4oeLd2B2HzkGnjAff4hWTJT6C7qHYB1Mv2wU5iHHGFWkhnTX9WsEAbunJCV2qcaXScKj4tTfvdDKfLiVuU2av6hbsMztirRze7LvYBkRHV3tGwyCptsrP","client_ip":"127.0.0.1","client_port":9708,"node_ip":"127.0.0.1","node_port":9707,"services":["VALIDATOR"]},"dest":"4PS3EDQ3dW1tci1Bp6543CfuuebjFrg36kLAUcskGfaA"},"metadata":{"from":"TWwCRQRZ2ZHMJFn9TzLp7W"},"type":"0"},"txnMetadata":{"seqNo":4,"txnId":"aa5e817d7cc626170eca175822029339a444eb0ee8f0bd20d3b0b76e566fb008"},"ver":"1"}

I also have my main.py file in the same folder as pool1.txn.
When I run main.py to connect to the local indy ledger, I get the error Could not find module 'indy.dll' (or one of its dependencies).

main.py file:

import asyncio
import json

from indy import pool
from indy.error import ErrorCode, IndyError

async def run():
    print("Indy demo program")

    print("STEP1 - Connect to Pool")
    pool_ = {
        "name": "pool1"
    }

    print("Open Pool Ledger: {}".format(pool_['name']))
    pool_['genesis_txn_path'] = "pool1.txn"
    pool_['config'] = json.dumps({"genesis_txn": str(pool_['genesis_txn_path'])})

    print(pool_)

    #connecting to pool
    await pool.set_protocol_version(2)

    try:
        await pool.create_pool_ledger_config(pool_['name'], pool_['config'])
    except IndyError as ex:
        if ex.error_code == ErrorCode.PoolLedgerConfigAlreadyExistsError:
            pass
        pool_['handle'] = await pool.open_pool_ledger(pool_['name'], None)

        print(pool_['handle'])

#loop = asyncio.get_event_loop()
#loop.run_until_complete(run())
asyncio.run(run())

The error I get:

PS C:UsersOnurDesktopindynptel> python main.py 
Indy demo program STEP1 - Connect to Pool Open Pool Ledger: pool1 {'name': 'pool1', 'genesis_txn_path': 'pool1.txn', 'config': '{"genesis_txn": "pool1.txn"}'}
    _load_cdll: Can't load libindy: Could not find module 'indy.dll' (or one of its dependencies). Try using the full path with constructor syntax. Traceback (most recent call last):   File "C:UsersOnurDesktopindynptelmain.py", line 35, in <module>
        asyncio.run(run())   File "C:UsersOnurAppDataLocalProgramsPythonPython310libasynciorunners.py", line 44, in run
        return loop.run_until_complete(main)   File "C:UsersOnurAppDataLocalProgramsPythonPython310libasynciobase_events.py", line 641, in run_until_complete
        return future.result()   File "C:UsersOnurDesktopindynptelmain.py", line 22, in run
        await pool.set_protocol_version(2)   File "C:UsersOnurAppDataLocalProgramsPythonPython310libsite-packagesindypool.py", line 212, in set_protocol_version
        res = await do_call('indy_set_protocol_version',   File "C:UsersOnurAppDataLocalProgramsPythonPython310libsite-packagesindylibindy.py", line 30, in do_call
        err = getattr(_cdll(), name)(command_handle,   File "C:UsersOnurAppDataLocalProgramsPythonPython310libsite-packagesindylibindy.py", line 133, in _cdll
        _cdll.cdll = _load_cdll()   File "C:UsersOnurAppDataLocalProgramsPythonPython310libsite-packagesindylibindy.py", line 165, in _load_cdll
        raise e   File "C:UsersOnurAppDataLocalProgramsPythonPython310libsite-packagesindylibindy.py", line 160, in _load_cdll
        res = CDLL(libindy_name)   File "C:UsersOnurAppDataLocalProgramsPythonPython310libctypes__init__.py", line 374, in __init__
        self._handle = _dlopen(self._name, mode) FileNotFoundError: Could not find module 'indy.dll' (or one of its dependencies). Try using the full path with constructor syntax. PS C:UsersOnurDesktopindynptel>

I have the following pip packages installed:

python3-indy           1.16.0.post286
indy                   0.1
indy-sdk               0.0.1.post152

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

Could Not Connect to Hyperledger Indy Test Pool via Python Wrapper – Error: indy.dll not found

I am trying to create and connect to a local Indy test ledger using the Docker image file from the indy-sdk repository. However, my Python code is giving the error: '_load_cdll: Can't load libindy: Could not find module 'indy.dll' (or one of its dependencies). I also provide the whole error text below. I am really new to Hyperledger Identity Stack, I would be grateful for any help.

I pursue the following steps to create and connect to my local Indy ledger.
I cloned indy-sdk repository from GitHub then ran the docker image as follows:

Cloning the repository:

C:UsersOnurDesktopindyy>git clone https://github.com/hyperledger-archives/indy-sdk.git

Navigating to repository folder indy-sdk

C:UsersOnurDesktopindyy>cd indy-sdk

Building image from docker file:

C:UsersOnurDesktopindyyindy-sdk>docker build -f ci/indy-pool.dockerfile -t indy_pool .

Output:

[+] Building 2.3s (15/15) FINISHED => [internal] load build
definition from indy-pool.dockerfile
0.0s => => transferring dockerfile: 42B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/ubuntu:16.04 2.1s => [ 1/11] FROM docker.io/library/ubuntu:16.04@sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6f 0.0s => CACHED [ 2/11] RUN apt-get update -y && apt-get install -y git wget python3.5 python3-pip python-setupto 0.0s => CACHED [
3/11] RUN pip3 install -U pip==9.0.3 setuptools
0.0s => CACHED [ 4/11] RUN apt-key adv –keyserver keyserver.ubuntu.com –recv-keys CE7709D068DB5E88 || apt-key adv
0.0s => CACHED [ 5/11] RUN echo “deb https://repo.sovrin.org/deb xenial master” >> /etc/apt/sources.list 0.0s => CACHED
[ 6/11] RUN useradd -ms /bin/bash -u 1000 indy
0.0s => CACHED [ 7/11] RUN apt-get update -y && apt-get install -y python3-pyzmq=18.1.0 indy-plenum=1 0.0s => CACHED [ 8/11]
RUN echo “[supervisord]nlogfile =
/tmp/supervisord.lognlogfile_maxbytes = 50MBnlogfile_back 0.0s =>
CACHED [ 9/11] RUN awk ‘{if (index($1, “NETWORK_NAME”) != 0)
{print(“NETWORK_NAME = “sandbox””)} else print 0.0s => CACHED
[10/11] RUN mv /tmp/indy_config.py /etc/indy/indy_config.py
0.0s => CACHED [11/11] RUN generate_indy_pool_transactions –nodes 4 –clients 5 –nodeNum 1 2 3 4 –ips=”127.0.0.1,1 0.0s => exporting to image
0.1s => => exporting layers 0.0s => => writing image sha256:ffd02987dfcc40a8ff7b8999e3b6453f753ec67f5ab693b9d7437492aa366dbb
0.0s => => naming to docker.io/library/indy_pool 0.0s

Use ‘docker scan’ to run Snyk tests against images to find
vulnerabilities and learn how to fix them

Running the container:

C:UsersOnurDesktopindyyindy-sdk>docker run -itd -p 9701-9708:9701-9708 indy_pool
3fc216ca3e59687a87f203ac3f58dd285c7bbd47e0fac1c361e636cd555c1957



C:UsersOnurDesktopindyyindy-sdk>docker ps
CONTAINER ID   IMAGE       COMMAND                  CREATED          STATUS          PORTS                              NAMES
3fc216ca3e59   indy_pool   "/usr/bin/supervisord"   44 seconds ago   Up 41 seconds   0.0.0.0:9701-9708->9701-9708/tcp   hopeful_boyd

C:UsersOnurDesktopindyyindy-sdk>docker exec -it 3fc216ca3e59 bash
indy@3fc216ca3e59:/$ cat /var/lib/indy/sandbox/
data/                        node1_info.json              node2_version_info.json      node4_additional_info.json
domain_transactions_genesis  node1_version_info.json      node3_additional_info.json   node4_info.json
keys/                        node2_additional_info.json   node3_info.json              node4_version_info.json
node1_additional_info.json   node2_info.json              node3_version_info.json      pool_transactions_genesis


indy@3fc216ca3e59:/$ cat /var/lib/indy/sandbox/pool_transactions_genesis

{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node1","blskey":"4N8aUNHSgjQVgkpm8nhNEfDf6txHznoYREg9kirmJrkivgL4oSEimFF6nsQ6M41QvhM2Z33nves5vfSn9n1UwNFJBYtWVnHYMATn76vLuL3zU88KyeAYcHfsih3He6UHcXDxcaecHVz6jhCYz1P2UZn2bDVruL5wXpehgBfBaLKm3Ba","blskey_pop":"RahHYiCvoNCtPTrVtP7nMC5eTYrsUA8WjXbdhNc8debh1agE9bGiJxWBXYNFbnJXoXhWFMvyqhqhRoq737YQemH5ik9oL7R4NTTCz2LEZhkgLJzB3QRQqJyBNyv7acbdHrAT8nQ9UkLbaVL9NBpnWXBTw4LEMePaSHEw66RzPNdAX1","client_ip":"127.0.0.1","client_port":9702,"node_ip":"127.0.0.1","node_port":9701,"services":["VALIDATOR"]},"dest":"Gw6pDLhcBcoQesN72qfotTgFa7cbuqZpkX3Xo6pLhPhv"},"metadata":{"from":"Th7MpTaRZVRYnPiabds81Y"},"type":"0"},"txnMetadata":{"seqNo":1,"txnId":"fea82e10e894419fe2bea7d96296a6d46f50f93f9eeda954ec461b2ed2950b62"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node2","blskey":"37rAPpXVoxzKhz7d9gkUe52XuXryuLXoM6P6LbWDB7LSbG62Lsb33sfG7zqS8TK1MXwuCHj1FKNzVpsnafmqLG1vXN88rt38mNFs9TENzm4QHdBzsvCuoBnPH7rpYYDo9DZNJePaDvRvqJKByCabubJz3XXKbEeshzpz4Ma5QYpJqjk","blskey_pop":"Qr658mWZ2YC8JXGXwMDQTzuZCWF7NK9EwxphGmcBvCh6ybUuLxbG65nsX4JvD4SPNtkJ2w9ug1yLTj6fgmuDg41TgECXjLCij3RMsV8CwewBVgVN67wsA45DFWvqvLtu4rjNnE9JbdFTc1Z4WCPA3Xan44K1HoHAq9EVeaRYs8zoF5","client_ip":"127.0.0.1","client_port":9704,"node_ip":"127.0.0.1","node_port":9703,"services":["VALIDATOR"]},"dest":"8ECVSk179mjsjKRLWiQtssMLgp6EPhWXtaYyStWPSGAb"},"metadata":{"from":"EbP4aYNeTHL6q385GuVpRV"},"type":"0"},"txnMetadata":{"seqNo":2,"txnId":"1ac8aece2a18ced660fef8694b61aac3af08ba875ce3026a160acbc3a3af35fc"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node3","blskey":"3WFpdbg7C5cnLYZwFZevJqhubkFALBfCBBok15GdrKMUhUjGsk3jV6QKj6MZgEubF7oqCafxNdkm7eswgA4sdKTRc82tLGzZBd6vNqU8dupzup6uYUf32KTHTPQbuUM8Yk4QFXjEf2Usu2TJcNkdgpyeUSX42u5LqdDDpNSWUK5deC5","blskey_pop":"QwDeb2CkNSx6r8QC8vGQK3GRv7Yndn84TGNijX8YXHPiagXajyfTjoR87rXUu4G4QLk2cF8NNyqWiYMus1623dELWwx57rLCFqGh7N4ZRbGDRP4fnVcaKg1BcUxQ866Ven4gw8y4N56S5HzxXNBZtLYmhGHvDtk6PFkFwCvxYrNYjh","client_ip":"127.0.0.1","client_port":9706,"node_ip":"127.0.0.1","node_port":9705,"services":["VALIDATOR"]},"dest":"DKVxG2fXXTU8yT5N7hGEbXB3dfdAnYv1JczDUHpmDxya"},"metadata":{"from":"4cU41vWW82ArfxJxHkzXPG"},"type":"0"},"txnMetadata":{"seqNo":3,"txnId":"7e9f355dffa78ed24668f0e0e369fd8c224076571c51e2ea8be5f26479edebe4"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node4","blskey":"2zN3bHM1m4rLz54MJHYSwvqzPchYp8jkHswveCLAEJVcX6Mm1wHQD1SkPYMzUDTZvWvhuE6VNAkK3KxVeEmsanSmvjVkReDeBEMxeDaayjcZjFGPydyey1qxBHmTvAnBKoPydvuTAqx5f7YNNRAdeLmUi99gERUU7TD8KfAa6MpQ9bw","blskey_pop":"RPLagxaR5xdimFzwmzYnz4ZhWtYQEj8iR5ZU53T2gitPCyCHQneUn2Huc4oeLd2B2HzkGnjAff4hWTJT6C7qHYB1Mv2wU5iHHGFWkhnTX9WsEAbunJCV2qcaXScKj4tTfvdDKfLiVuU2av6hbsMztirRze7LvYBkRHV3tGwyCptsrP","client_ip":"127.0.0.1","client_port":9708,"node_ip":"127.0.0.1","node_port":9707,"services":["VALIDATOR"]},"dest":"4PS3EDQ3dW1tci1Bp6543CfuuebjFrg36kLAUcskGfaA"},"metadata":{"from":"TWwCRQRZ2ZHMJFn9TzLp7W"},"type":"0"},"txnMetadata":{"seqNo":4,"txnId":"aa5e817d7cc626170eca175822029339a444eb0ee8f0bd20d3b0b76e566fb008"},"ver":"1"}
indy@3fc216ca3e59:/$

Then, I copied the genesis content and pasted it into my pool1.txn file in VSCode. Here is the content of pool1.txn file:

{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node1","blskey":"4N8aUNHSgjQVgkpm8nhNEfDf6txHznoYREg9kirmJrkivgL4oSEimFF6nsQ6M41QvhM2Z33nves5vfSn9n1UwNFJBYtWVnHYMATn76vLuL3zU88KyeAYcHfsih3He6UHcXDxcaecHVz6jhCYz1P2UZn2bDVruL5wXpehgBfBaLKm3Ba","blskey_pop":"RahHYiCvoNCtPTrVtP7nMC5eTYrsUA8WjXbdhNc8debh1agE9bGiJxWBXYNFbnJXoXhWFMvyqhqhRoq737YQemH5ik9oL7R4NTTCz2LEZhkgLJzB3QRQqJyBNyv7acbdHrAT8nQ9UkLbaVL9NBpnWXBTw4LEMePaSHEw66RzPNdAX1","client_ip":"127.0.0.1","client_port":9702,"node_ip":"127.0.0.1","node_port":9701,"services":["VALIDATOR"]},"dest":"Gw6pDLhcBcoQesN72qfotTgFa7cbuqZpkX3Xo6pLhPhv"},"metadata":{"from":"Th7MpTaRZVRYnPiabds81Y"},"type":"0"},"txnMetadata":{"seqNo":1,"txnId":"fea82e10e894419fe2bea7d96296a6d46f50f93f9eeda954ec461b2ed2950b62"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node2","blskey":"37rAPpXVoxzKhz7d9gkUe52XuXryuLXoM6P6LbWDB7LSbG62Lsb33sfG7zqS8TK1MXwuCHj1FKNzVpsnafmqLG1vXN88rt38mNFs9TENzm4QHdBzsvCuoBnPH7rpYYDo9DZNJePaDvRvqJKByCabubJz3XXKbEeshzpz4Ma5QYpJqjk","blskey_pop":"Qr658mWZ2YC8JXGXwMDQTzuZCWF7NK9EwxphGmcBvCh6ybUuLxbG65nsX4JvD4SPNtkJ2w9ug1yLTj6fgmuDg41TgECXjLCij3RMsV8CwewBVgVN67wsA45DFWvqvLtu4rjNnE9JbdFTc1Z4WCPA3Xan44K1HoHAq9EVeaRYs8zoF5","client_ip":"127.0.0.1","client_port":9704,"node_ip":"127.0.0.1","node_port":9703,"services":["VALIDATOR"]},"dest":"8ECVSk179mjsjKRLWiQtssMLgp6EPhWXtaYyStWPSGAb"},"metadata":{"from":"EbP4aYNeTHL6q385GuVpRV"},"type":"0"},"txnMetadata":{"seqNo":2,"txnId":"1ac8aece2a18ced660fef8694b61aac3af08ba875ce3026a160acbc3a3af35fc"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node3","blskey":"3WFpdbg7C5cnLYZwFZevJqhubkFALBfCBBok15GdrKMUhUjGsk3jV6QKj6MZgEubF7oqCafxNdkm7eswgA4sdKTRc82tLGzZBd6vNqU8dupzup6uYUf32KTHTPQbuUM8Yk4QFXjEf2Usu2TJcNkdgpyeUSX42u5LqdDDpNSWUK5deC5","blskey_pop":"QwDeb2CkNSx6r8QC8vGQK3GRv7Yndn84TGNijX8YXHPiagXajyfTjoR87rXUu4G4QLk2cF8NNyqWiYMus1623dELWwx57rLCFqGh7N4ZRbGDRP4fnVcaKg1BcUxQ866Ven4gw8y4N56S5HzxXNBZtLYmhGHvDtk6PFkFwCvxYrNYjh","client_ip":"127.0.0.1","client_port":9706,"node_ip":"127.0.0.1","node_port":9705,"services":["VALIDATOR"]},"dest":"DKVxG2fXXTU8yT5N7hGEbXB3dfdAnYv1JczDUHpmDxya"},"metadata":{"from":"4cU41vWW82ArfxJxHkzXPG"},"type":"0"},"txnMetadata":{"seqNo":3,"txnId":"7e9f355dffa78ed24668f0e0e369fd8c224076571c51e2ea8be5f26479edebe4"},"ver":"1"}
{"reqSignature":{},"txn":{"data":{"data":{"alias":"Node4","blskey":"2zN3bHM1m4rLz54MJHYSwvqzPchYp8jkHswveCLAEJVcX6Mm1wHQD1SkPYMzUDTZvWvhuE6VNAkK3KxVeEmsanSmvjVkReDeBEMxeDaayjcZjFGPydyey1qxBHmTvAnBKoPydvuTAqx5f7YNNRAdeLmUi99gERUU7TD8KfAa6MpQ9bw","blskey_pop":"RPLagxaR5xdimFzwmzYnz4ZhWtYQEj8iR5ZU53T2gitPCyCHQneUn2Huc4oeLd2B2HzkGnjAff4hWTJT6C7qHYB1Mv2wU5iHHGFWkhnTX9WsEAbunJCV2qcaXScKj4tTfvdDKfLiVuU2av6hbsMztirRze7LvYBkRHV3tGwyCptsrP","client_ip":"127.0.0.1","client_port":9708,"node_ip":"127.0.0.1","node_port":9707,"services":["VALIDATOR"]},"dest":"4PS3EDQ3dW1tci1Bp6543CfuuebjFrg36kLAUcskGfaA"},"metadata":{"from":"TWwCRQRZ2ZHMJFn9TzLp7W"},"type":"0"},"txnMetadata":{"seqNo":4,"txnId":"aa5e817d7cc626170eca175822029339a444eb0ee8f0bd20d3b0b76e566fb008"},"ver":"1"}

I also have my main.py file in the same folder as pool1.txn.
When I run main.py to connect to the local indy ledger, I get the error Could not find module 'indy.dll' (or one of its dependencies).

main.py file:

import asyncio
import json

from indy import pool
from indy.error import ErrorCode, IndyError

async def run():
    print("Indy demo program")

    print("STEP1 - Connect to Pool")
    pool_ = {
        "name": "pool1"
    }

    print("Open Pool Ledger: {}".format(pool_['name']))
    pool_['genesis_txn_path'] = "pool1.txn"
    pool_['config'] = json.dumps({"genesis_txn": str(pool_['genesis_txn_path'])})

    print(pool_)

    #connecting to pool
    await pool.set_protocol_version(2)

    try:
        await pool.create_pool_ledger_config(pool_['name'], pool_['config'])
    except IndyError as ex:
        if ex.error_code == ErrorCode.PoolLedgerConfigAlreadyExistsError:
            pass
        pool_['handle'] = await pool.open_pool_ledger(pool_['name'], None)

        print(pool_['handle'])

#loop = asyncio.get_event_loop()
#loop.run_until_complete(run())
asyncio.run(run())

The error I get:

PS C:UsersOnurDesktopindynptel> python main.py 
Indy demo program STEP1 - Connect to Pool Open Pool Ledger: pool1 {'name': 'pool1', 'genesis_txn_path': 'pool1.txn', 'config': '{"genesis_txn": "pool1.txn"}'}
    _load_cdll: Can't load libindy: Could not find module 'indy.dll' (or one of its dependencies). Try using the full path with constructor syntax. Traceback (most recent call last):   File "C:UsersOnurDesktopindynptelmain.py", line 35, in <module>
        asyncio.run(run())   File "C:UsersOnurAppDataLocalProgramsPythonPython310libasynciorunners.py", line 44, in run
        return loop.run_until_complete(main)   File "C:UsersOnurAppDataLocalProgramsPythonPython310libasynciobase_events.py", line 641, in run_until_complete
        return future.result()   File "C:UsersOnurDesktopindynptelmain.py", line 22, in run
        await pool.set_protocol_version(2)   File "C:UsersOnurAppDataLocalProgramsPythonPython310libsite-packagesindypool.py", line 212, in set_protocol_version
        res = await do_call('indy_set_protocol_version',   File "C:UsersOnurAppDataLocalProgramsPythonPython310libsite-packagesindylibindy.py", line 30, in do_call
        err = getattr(_cdll(), name)(command_handle,   File "C:UsersOnurAppDataLocalProgramsPythonPython310libsite-packagesindylibindy.py", line 133, in _cdll
        _cdll.cdll = _load_cdll()   File "C:UsersOnurAppDataLocalProgramsPythonPython310libsite-packagesindylibindy.py", line 165, in _load_cdll
        raise e   File "C:UsersOnurAppDataLocalProgramsPythonPython310libsite-packagesindylibindy.py", line 160, in _load_cdll
        res = CDLL(libindy_name)   File "C:UsersOnurAppDataLocalProgramsPythonPython310libctypes__init__.py", line 374, in __init__
        self._handle = _dlopen(self._name, mode) FileNotFoundError: Could not find module 'indy.dll' (or one of its dependencies). Try using the full path with constructor syntax. PS C:UsersOnurDesktopindynptel>

I have the following pip packages installed:

python3-indy           1.16.0.post286
indy                   0.1
indy-sdk               0.0.1.post152

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT