hyperledger / indy-plenum

Plenum Byzantine Fault Tolerant Protocol
https://wiki.hyperledger.org/display/indy
Apache License 2.0
215 stars 370 forks source link

Test sovrin-client ERROR TypeError: Can't mix strings and bytes in path components #723

Closed xzcccc closed 6 years ago

xzcccc commented 6 years ago

I install the sovrin-node by $ pip install -U --no-cache-dir sovrin-client . (And this command is follow the guide form https://www.evernym.com) However, when I run the sovrin, it was something error. As follow is the error code:

` $ sovrin
Loading module /usr/local/lib/python3.5/dist-packages/config/config-crypto-example1.py
Module loaded.

Sovrin-CLI (c) 2017 Evernym, Inc.
Node registry loaded.
    EvernymV1: 52.33.22.91:9721
    EvernymV2: 52.38.24.189:9723
    RespectNetwork: 34.200.79.65:9729
    BULLDOG: 52.56.74.57:9746
Type 'help' for more information.
Running Sovrin 0.3.23

Saved keyring "Default" restored (/home/pi/.sovrin/keyrings/no-env/default.wallet)
Active keyring set to "Default"
sovrin> prompt ALICE
ALICE> connect test
Active keyring "Default" saved (/home/pi/.sovrin/keyrings/no-env/default.wallet)
Current active keyring got moved to 'test' environment. Here is the detail:
    keyring name: Default
    old location: /home/pi/.sovrin/keyrings/no-env/default.wallet
    new location: /home/pi/.sovrin/keyrings/test/default.wallet

Saved keyring "Default" restored (/home/pi/.sovrin/keyrings/test/default.wallet)
Active keyring set to "Default"
Error while running coroutine shell: TypeError("Can't mix strings and bytes in path components",)
Traceback (most recent call last):
  File "/usr/local/bin/sovrin", line 78, in <module>
    run_cli()
  File "/usr/local/bin/sovrin", line 56, in run_cli
    looper.run(cli.shell(*commands))
  File "/usr/local/lib/python3.5/dist-packages/stp_core/loop/looper.py", line 254, in run
    return self.loop.run_until_complete(what)
  File "/usr/lib/python3.5/asyncio/base_events.py", line 466, in run_until_complete
    return future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/usr/local/lib/python3.5/dist-packages/stp_core/loop/looper.py", line 245, in wrapper
    raise ex
  File "/usr/local/lib/python3.5/dist-packages/stp_core/loop/looper.py", line 233, in wrapper
    results.append(await coro)
  File "/usr/local/lib/python3.5/dist-packages/plenum/cli/cli.py", line 1119, in shell
    self.parse(c)
  File "/usr/local/lib/python3.5/dist-packages/plenum/cli/cli.py", line 1902, in parse
    r = action(matchedVars)
  File "/usr/local/lib/python3.5/dist-packages/sovrin_client/cli/cli.py", line 1611, in _connectTo
    self._buildClientIfNotExists(self.config)
  File "/usr/local/lib/python3.5/dist-packages/plenum/cli/cli.py", line 543, in _buildClientIfNotExists
    self.newClient(clientName=name, config=config)
  File "/usr/local/lib/python3.5/dist-packages/sovrin_client/cli/cli.py", line 382, in newClient
    client = super().newClient(clientName, config=config)
  File "/usr/local/lib/python3.5/dist-packages/plenum/cli/cli.py", line 1039, in newClient
    config=config)
  File "/usr/local/lib/python3.5/dist-packages/sovrin_client/client/client.py", line 51, in __init__
    sighex)
  File "/usr/local/lib/python3.5/dist-packages/plenum/client/client.py", line 85, in __init__
    if self.exists(self.stackName, basedirpath):
  File "/usr/local/lib/python3.5/dist-packages/plenum/client/client.py", line 211, in exists
    os.path.exists(os.path.join(basedirpath, name))
  File "/usr/lib/python3.5/posixpath.py", line 89, in join
    genericpath._check_arg_types('join', a, *p)
  File "/usr/lib/python3.5/genericpath.py", line 145, in _check_arg_types
    raise TypeError("Can't mix strings and bytes in path components") from None
TypeError: Can't mix strings and bytes in path components`

I dont know how to solve this question....

Python version:3.5 Pip version:9.0.1 OS version:Debian 9

THANKS

ashcherbakov commented 6 years ago

I think instruction from Evernym.com is very outdated. There is no sovrin-client repo. If you want to have indy-node (and indy-plenum) for development and local running of tests, then please follow the instructions from https://github.com/hyperledger/indy-node/blob/master/docs/setup-dev.md

If you just want to run a pool, then you can use Docker: https://github.com/hyperledger/indy-node/tree/master/environment/docker/pool