outlierventures / anvil Goto Github PK
View Code? Open in Web Editor NEWAgent Negotiation Verifiable Interaction Layer – an app in the Convergence Stack.
Home Page: https://anvil.outlierventures.io
License: Apache License 2.0
Agent Negotiation Verifiable Interaction Layer – an app in the Convergence Stack.
Home Page: https://anvil.outlierventures.io
License: Apache License 2.0
In Issuer:
Result: Internal Server Error, below log on Issuer console.
[2019-03-26 12:22:20,937] 127.0.0.1:47392 GET / 1.1 200 1724 3787
Issuer offering credential to Prover...
[2019-03-26 12:22:41,222] ERROR in app: Exception on request POST /offer_credential
Traceback (most recent call last):
File "/home/aron/.local/lib/python3.6/site-packages/quart/app.py", line 1449, in handle_request
return await self.full_dispatch_request(request_context)
File "/home/aron/.local/lib/python3.6/site-packages/quart/app.py", line 1471, in full_dispatch_request
result = await self.handle_user_exception(error)
File "/home/aron/.local/lib/python3.6/site-packages/quart/app.py", line 892, in handle_user_exception
raise error
File "/home/aron/.local/lib/python3.6/site-packages/quart/app.py", line 1469, in full_dispatch_request
result = await self.dispatch_request(request_context)
File "/home/aron/.local/lib/python3.6/site-packages/quart/app.py", line 1517, in dispatch_request
return await handler(**request_.view_args)
File "issuer.py", line 119, in offer_credential_to_ip
issuer, cred_offer = await offer_credential(issuer, schema_name)
File "/home/aron/develop/ANVIL/anvil/sovrin/credentials.py", line 30, in offer_credential
await crypto.auth_crypt(issuer['wallet'], issuer['prover_key'], issuer['prover_key_for_issuer'],
KeyError: 'prover_key'
[2019-03-26 12:22:41,234] 127.0.0.1:47426 POST /offer_credential 1.1 500 126 26218
On pool setup, actors on same machine all try to create the same pool ledger config as part of their own data structure setup.
_indy_loop_callback: Function returned error (<ErrorCode.PoolLedgerConfigAlreadyExistsError: 306>, 'Error: Pool ledger config already exists\n Caused by: Pool ledger config file with name "ANVIL" already exists\n')
Fix: check pool exists, and only instantiate a new pool ledger config if it doesn't.
Running ./test.sh
after ./install.sh
on Ubuntu 18.04.1. Some tests fail because of missing pytest
.
I have python3-pytest
.
$ ./test.sh
Testing Fetch install...
GLOB sdist-make: /home/aron/develop/ANVIL/scripts/oefpy/setup.py
py37 create: /home/aron/develop/ANVIL/scripts/oefpy/.tox/py37
py37 installdeps: pytest, pytest-cov, hypothesis, hypothesis-pytest
py37 inst: /home/aron/develop/ANVIL/scripts/oefpy/.tox/dist/oef-0.2.0.zip
py37 installed: atomicwrites==1.3.0,attrs==19.1.0,coverage==4.5.3,hypothesis==4.14.0,hypothesis-pytest==0.19.0,more-itertools==6.0.0,oef==0.2.0,pkg-resources==0.0.0,pluggy==0.9.0,protobuf==3.7.0,py==1.8.0,pytest==4.3.1,pytest-cov==2.6.1,six==1.12.0
py37 runtests: PYTHONHASHSEED='3330008068'
py37 runtests: commands[0] | python setup.py install
running install
running bdist_egg
running egg_info
writing oef.egg-info/PKG-INFO
writing dependency_links to oef.egg-info/dependency_links.txt
writing requirements to oef.egg-info/requires.txt
writing top-level names to oef.egg-info/top_level.txt
reading manifest file 'oef.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'oef.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running protoc
Running ['/usr/bin/protoc', '--proto_path=oef-core-protocol', '--python_out=oef', 'oef-core-protocol/query.proto', 'oef-core-protocol/fipa.proto', 'oef-core-protocol/agent.proto']
copying oef/agent_pb2.py -> build/lib/oef
copying oef/fipa_pb2.py -> build/lib/oef
copying oef/query_pb2.py -> build/lib/oef
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/oef
copying build/lib/oef/__init__.py -> build/bdist.linux-x86_64/egg/oef
copying build/lib/oef/logger.py -> build/bdist.linux-x86_64/egg/oef
copying build/lib/oef/core.py -> build/bdist.linux-x86_64/egg/oef
copying build/lib/oef/dialogue.py -> build/bdist.linux-x86_64/egg/oef
copying build/lib/oef/agent_pb2.py -> build/bdist.linux-x86_64/egg/oef
copying build/lib/oef/schema.py -> build/bdist.linux-x86_64/egg/oef
copying build/lib/oef/query.py -> build/bdist.linux-x86_64/egg/oef
copying build/lib/oef/proxy.py -> build/bdist.linux-x86_64/egg/oef
copying build/lib/oef/agents.py -> build/bdist.linux-x86_64/egg/oef
copying build/lib/oef/fipa_pb2.py -> build/bdist.linux-x86_64/egg/oef
copying build/lib/oef/__version__.py -> build/bdist.linux-x86_64/egg/oef
copying build/lib/oef/query_pb2.py -> build/bdist.linux-x86_64/egg/oef
copying build/lib/oef/messages.py -> build/bdist.linux-x86_64/egg/oef
copying build/lib/oef/helpers.py -> build/bdist.linux-x86_64/egg/oef
byte-compiling build/bdist.linux-x86_64/egg/oef/__init__.py to __init__.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/oef/logger.py to logger.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/oef/core.py to core.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/oef/dialogue.py to dialogue.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/oef/agent_pb2.py to agent_pb2.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/oef/schema.py to schema.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/oef/query.py to query.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/oef/proxy.py to proxy.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/oef/agents.py to agents.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/oef/fipa_pb2.py to fipa_pb2.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/oef/__version__.py to __version__.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/oef/query_pb2.py to query_pb2.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/oef/messages.py to messages.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/oef/helpers.py to helpers.cpython-37.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying oef.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying oef.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying oef.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying oef.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying oef.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/oef-0.2.0-py3.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing oef-0.2.0-py3.7.egg
Copying oef-0.2.0-py3.7.egg to /home/aron/develop/ANVIL/scripts/oefpy/.tox/py37/lib/python3.7/site-packages
Adding oef 0.2.0 to easy-install.pth file
Installed /home/aron/develop/ANVIL/scripts/oefpy/.tox/py37/lib/python3.7/site-packages/oef-0.2.0-py3.7.egg
Processing dependencies for oef==0.2.0
Searching for protobuf==3.7.0
Best match: protobuf 3.7.0
Adding protobuf 3.7.0 to easy-install.pth file
Using /home/aron/develop/ANVIL/scripts/oefpy/.tox/py37/lib/python3.7/site-packages
Searching for setuptools==40.8.0
Best match: setuptools 40.8.0
Adding setuptools 40.8.0 to easy-install.pth file
Installing easy_install script to /home/aron/develop/ANVIL/scripts/oefpy/.tox/py37/bin
Installing easy_install-3.6 script to /home/aron/develop/ANVIL/scripts/oefpy/.tox/py37/bin
Using /home/aron/develop/ANVIL/scripts/oefpy/.tox/py37/lib/python3.7/site-packages
Searching for six==1.12.0
Best match: six 1.12.0
Adding six 1.12.0 to easy-install.pth file
Using /home/aron/develop/ANVIL/scripts/oefpy/.tox/py37/lib/python3.7/site-packages
Finished processing dependencies for oef==0.2.0
py37 runtests: commands[1] | pytest --doctest-modules oef test --cov=oef --cov-report=html --cov-report=term
============================================================================================= test session starts ==============================================================================================
platform linux -- Python 3.7.2, pytest-4.3.1, py-1.8.0, pluggy-0.9.0
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/home/aron/develop/ANVIL/scripts/oefpy/.hypothesis/examples')
rootdir: /home/aron/develop/ANVIL/scripts/oefpy, inifile:
plugins: cov-2.6.1, hypothesis-4.14.0
collected 135 items
oef/logger.py . [ 0%]
oef/query.py ............... [ 11%]
oef/schema.py ... [ 14%]
test/test_agents.py ........ [ 20%]
test/test_logger.py ........................ [ 37%]
test/test_proxy.py .............................. [ 60%]
test/test_query.py ........................ [ 77%]
test/test_schema.py ................. [ 90%]
test/test_dialogue/test_group_dialogue.py . [ 91%]
test/test_dialogue/test_single_dialogue.py .....FFFFFFF [100%]
=================================================================================================== FAILURES ===================================================================================================
_____________________________________________________________________________________________ TestCFP.test_on_cfp ______________________________________________________________________________________________
self = <test.test_dialogue.test_single_dialogue.TestCFP object at 0x7f54105e8b00>
def test_on_cfp(self):
"""Test that a dialogue agent can receive and handle a CFP correctly."""
with NetworkOEFNode():
dialogue_agent_0 = AgentSingleDialogueTest(OEFNetworkProxy("dialogue_agent_0", "127.0.0.1"))
> dialogue_agent_0.connect()
test/test_dialogue/test_single_dialogue.py:103:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
oef/agents.py:122: in connect
return self._loop.run_until_complete(self.async_connect())
/usr/lib/python3.7/asyncio/base_events.py:584: in run_until_complete
return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test.test_dialogue.dialogue_agents.AgentSingleDialogueTest object at 0x7f54105e8550>
async def async_connect(self) -> bool:
"""
The asynchronous counterpart of :func:`~oef.agents.Agent.connect`.
:return: True if the connection has been established successfully, False otherwise.
"""
logger.debug("{}: Connecting...".format(self.public_key))
status = await self._oef_proxy.connect()
if status:
logger.debug("{}: Connection established.".format(self.public_key))
else:
> raise OEFConnectionError("Public key already in use.")
E oef.proxy.OEFConnectionError: Public key already in use.
oef/agents.py:135: OEFConnectionError
_________________________________________________________________________ TestPropose.test_on_propose_as_first_message_gives_an_error __________________________________________________________________________
self = <test.test_dialogue.test_single_dialogue.TestPropose object at 0x7f54109d5470>
def test_on_propose_as_first_message_gives_an_error(self):
"""Test that if the dialogue agent sends a propose as first message we get an Error."""
with pytest.raises(KeyError, match="Dialogue key .* not found"):
with NetworkOEFNode():
dialogue_agent_0 = AgentSingleDialogueTest(OEFNetworkProxy("dialogue_agent_0", "127.0.0.1"))
> dialogue_agent_0.connect()
test/test_dialogue/test_single_dialogue.py:124:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
oef/agents.py:122: in connect
return self._loop.run_until_complete(self.async_connect())
/usr/lib/python3.7/asyncio/base_events.py:584: in run_until_complete
return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test.test_dialogue.dialogue_agents.AgentSingleDialogueTest object at 0x7f5410556a90>
async def async_connect(self) -> bool:
"""
The asynchronous counterpart of :func:`~oef.agents.Agent.connect`.
:return: True if the connection has been established successfully, False otherwise.
"""
logger.debug("{}: Connecting...".format(self.public_key))
status = await self._oef_proxy.connect()
if status:
logger.debug("{}: Connection established.".format(self.public_key))
else:
> raise OEFConnectionError("Public key already in use.")
E oef.proxy.OEFConnectionError: Public key already in use.
oef/agents.py:135: OEFConnectionError
_________________________________________________________________________________________ TestPropose.test_on_propose __________________________________________________________________________________________
self = <test.test_dialogue.test_single_dialogue.TestPropose object at 0x7f54104a9048>
def test_on_propose(self):
"""Test that a dialogue agent can receive and handle a Propose correctly."""
with NetworkOEFNode():
dialogue_agent_0 = AgentSingleDialogueTest(OEFNetworkProxy("dialogue_agent_0", "127.0.0.1"))
> dialogue_agent_0.connect()
test/test_dialogue/test_single_dialogue.py:135:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
oef/agents.py:122: in connect
return self._loop.run_until_complete(self.async_connect())
/usr/lib/python3.7/asyncio/base_events.py:584: in run_until_complete
return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test.test_dialogue.dialogue_agents.AgentSingleDialogueTest object at 0x7f54104a93c8>
async def async_connect(self) -> bool:
"""
The asynchronous counterpart of :func:`~oef.agents.Agent.connect`.
:return: True if the connection has been established successfully, False otherwise.
"""
logger.debug("{}: Connecting...".format(self.public_key))
status = await self._oef_proxy.connect()
if status:
logger.debug("{}: Connection established.".format(self.public_key))
else:
> raise OEFConnectionError("Public key already in use.")
E oef.proxy.OEFConnectionError: Public key already in use.
oef/agents.py:135: OEFConnectionError
__________________________________________________________________________ TestAccept.test_on_accept_as_first_message_gives_an_error ___________________________________________________________________________
self = <test.test_dialogue.test_single_dialogue.TestAccept object at 0x7f54106870b8>
def test_on_accept_as_first_message_gives_an_error(self):
"""Test that if the dialogue agent sends an accept as first message we get an Error."""
with pytest.raises(KeyError, match="Dialogue key .* not found"):
with NetworkOEFNode():
dialogue_agent_0 = AgentSingleDialogueTest(OEFNetworkProxy("dialogue_agent_0", "127.0.0.1"))
> dialogue_agent_0.connect()
test/test_dialogue/test_single_dialogue.py:158:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
oef/agents.py:122: in connect
return self._loop.run_until_complete(self.async_connect())
/usr/lib/python3.7/asyncio/base_events.py:584: in run_until_complete
return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test.test_dialogue.dialogue_agents.AgentSingleDialogueTest object at 0x7f54106c16a0>
async def async_connect(self) -> bool:
"""
The asynchronous counterpart of :func:`~oef.agents.Agent.connect`.
:return: True if the connection has been established successfully, False otherwise.
"""
logger.debug("{}: Connecting...".format(self.public_key))
status = await self._oef_proxy.connect()
if status:
logger.debug("{}: Connection established.".format(self.public_key))
else:
> raise OEFConnectionError("Public key already in use.")
E oef.proxy.OEFConnectionError: Public key already in use.
oef/agents.py:135: OEFConnectionError
__________________________________________________________________________________________ TestAccept.test_on_propose __________________________________________________________________________________________
self = <test.test_dialogue.test_single_dialogue.TestAccept object at 0x7f54105407b8>
def test_on_propose(self):
"""Test that a dialogue agent can receive and handle a Accept correctly."""
with NetworkOEFNode():
dialogue_agent_0 = AgentSingleDialogueTest(OEFNetworkProxy("dialogue_agent_0", "127.0.0.1"))
> dialogue_agent_0.connect()
test/test_dialogue/test_single_dialogue.py:169:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
oef/agents.py:122: in connect
return self._loop.run_until_complete(self.async_connect())
/usr/lib/python3.7/asyncio/base_events.py:584: in run_until_complete
return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test.test_dialogue.dialogue_agents.AgentSingleDialogueTest object at 0x7f5410540c18>
async def async_connect(self) -> bool:
"""
The asynchronous counterpart of :func:`~oef.agents.Agent.connect`.
:return: True if the connection has been established successfully, False otherwise.
"""
logger.debug("{}: Connecting...".format(self.public_key))
status = await self._oef_proxy.connect()
if status:
logger.debug("{}: Connection established.".format(self.public_key))
else:
> raise OEFConnectionError("Public key already in use.")
E oef.proxy.OEFConnectionError: Public key already in use.
oef/agents.py:135: OEFConnectionError
_________________________________________________________________________ TestDecline.test_on_decline_as_first_message_gives_an_error __________________________________________________________________________
self = <test.test_dialogue.test_single_dialogue.TestDecline object at 0x7f5410767128>
def test_on_decline_as_first_message_gives_an_error(self):
"""Test that if the dialogue agent sends an accept as first message we get an Error."""
with pytest.raises(KeyError, match="Dialogue key .* not found"):
with NetworkOEFNode():
dialogue_agent_0 = AgentSingleDialogueTest(OEFNetworkProxy("dialogue_agent_0", "127.0.0.1"))
> dialogue_agent_0.connect()
test/test_dialogue/test_single_dialogue.py:194:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
oef/agents.py:122: in connect
return self._loop.run_until_complete(self.async_connect())
/usr/lib/python3.7/asyncio/base_events.py:584: in run_until_complete
return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test.test_dialogue.dialogue_agents.AgentSingleDialogueTest object at 0x7f5410776f98>
async def async_connect(self) -> bool:
"""
The asynchronous counterpart of :func:`~oef.agents.Agent.connect`.
:return: True if the connection has been established successfully, False otherwise.
"""
logger.debug("{}: Connecting...".format(self.public_key))
status = await self._oef_proxy.connect()
if status:
logger.debug("{}: Connection established.".format(self.public_key))
else:
> raise OEFConnectionError("Public key already in use.")
E oef.proxy.OEFConnectionError: Public key already in use.
oef/agents.py:135: OEFConnectionError
_________________________________________________________________________________________ TestDecline.test_on_decline __________________________________________________________________________________________
self = <test.test_dialogue.test_single_dialogue.TestDecline object at 0x7f54104a9828>
def test_on_decline(self):
"""Test that a dialogue agent can receive and handle a Accept correctly."""
with NetworkOEFNode():
dialogue_agent_0 = AgentSingleDialogueTest(OEFNetworkProxy("dialogue_agent_0", "127.0.0.1"))
> dialogue_agent_0.connect()
test/test_dialogue/test_single_dialogue.py:205:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
oef/agents.py:122: in connect
return self._loop.run_until_complete(self.async_connect())
/usr/lib/python3.7/asyncio/base_events.py:584: in run_until_complete
return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test.test_dialogue.dialogue_agents.AgentSingleDialogueTest object at 0x7f54104a9a90>
async def async_connect(self) -> bool:
"""
The asynchronous counterpart of :func:`~oef.agents.Agent.connect`.
:return: True if the connection has been established successfully, False otherwise.
"""
logger.debug("{}: Connecting...".format(self.public_key))
status = await self._oef_proxy.connect()
if status:
logger.debug("{}: Connection established.".format(self.public_key))
else:
> raise OEFConnectionError("Public key already in use.")
E oef.proxy.OEFConnectionError: Public key already in use.
oef/agents.py:135: OEFConnectionError
=============================================================================================== warnings summary ===============================================================================================
.tox/py37/lib/python3.7/site-packages/google/protobuf/descriptor.py:47
/home/aron/develop/ANVIL/scripts/oefpy/.tox/py37/lib/python3.7/site-packages/google/protobuf/descriptor.py:47: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from google.protobuf.pyext import _message
test/test_proxy.py::TestSimpleMessage::test_on_message[local]
test/test_proxy.py::TestSimpleMessage::test_on_message[networked]
test/test_proxy.py::TestCFP::test_on_cfp[local]
test/test_proxy.py::TestCFP::test_on_cfp[networked]
test/test_proxy.py::TestPropose::test_on_propose[local]
test/test_proxy.py::TestPropose::test_on_propose[networked]
test/test_proxy.py::TestAccept::test_on_accept[local]
test/test_proxy.py::TestAccept::test_on_accept[networked]
test/test_proxy.py::TestDecline::test_on_decline[local]
test/test_proxy.py::TestDecline::test_on_decline[networked]
test/test_proxy.py::TestSearchServices::test_on_search_result_services[local]
test/test_proxy.py::TestSearchServices::test_on_search_result_services[networked]
test/test_proxy.py::TestSearchAgents::test_on_search_result_agents[local]
test/test_proxy.py::TestSearchAgents::test_on_search_result_agents[networked]
test/test_proxy.py::TestUnregisterAgent::test_unregister_agent[local]
test/test_proxy.py::TestUnregisterAgent::test_unregister_agent[networked]
test/test_proxy.py::TestUnregisterService::test_unregister_service[local]
test/test_proxy.py::TestUnregisterService::test_unregister_service[networked]
test/test_proxy.py::TestOEFError::test_oef_error_when_failing_in_unregistering_service
test/test_proxy.py::TestDialogueError::test_dialogue_error_when_destination_is_not_connected
/home/aron/develop/ANVIL/scripts/oefpy/test/common.py:147: PendingDeprecationWarning: Task.all_tasks() is deprecated, use asyncio.all_tasks() instead
tasks = asyncio.Task.all_tasks(asyncio.get_event_loop())
-- Docs: https://docs.pytest.org/en/latest/warnings.html
----------- coverage: platform linux, python 3.7.2-final-0 -----------
Name Stmts Miss Cover
----------------------------------------
oef/__init__.py 4 0 100%
oef/__version__.py 8 0 100%
oef/agent_pb2.py 139 0 100%
oef/agents.py 106 0 100%
oef/core.py 112 2 98%
oef/dialogue.py 115 14 88%
oef/fipa_pb2.py 62 0 100%
oef/helpers.py 12 0 100%
oef/logger.py 13 0 100%
oef/messages.py 178 0 100%
oef/proxy.py 246 0 100%
oef/query.py 407 0 100%
oef/query_pb2.py 183 0 100%
oef/schema.py 152 0 100%
----------------------------------------
TOTAL 1737 16 99%
Coverage HTML written to dir htmlcov
============================================================================== 7 failed, 128 passed, 21 warnings in 16.62 seconds ==============================================================================
ERROR: InvocationError: '/home/aron/develop/ANVIL/scripts/oefpy/.tox/py37/bin/pytest --doctest-modules oef test --cov=oef --cov-report=html --cov-report=term'
___________________________________________________________________________________________________ summary ____________________________________________________________________________________________________
ERROR: py37: commands failed
Testing Sovrin install...
./test.sh: line 19: pytest: command not found
Tests complete, see results above.
While triaging #3 I'm getting the below on Ubuntu 18.04.1:
Last part of output of ./install.sh
:
Installing Sovrin...
Cloning into 'indy-sdk'...
remote: Enumerating objects: 62, done.
remote: Counting objects: 100% (62/62), done.
remote: Compressing objects: 100% (44/44), done.
remote: Total 88305 (delta 19), reused 30 (delta 18), pack-reused 88243
Receiving objects: 100% (88305/88305), 261.21 MiB | 5.80 MiB/s, done.
Resolving deltas: 100% (60013/60013), done.
Executing: /tmp/apt-key-gpghome.UuOVUa1Sh4/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88
gpg: key CE7709D068DB5E88: "Sovrin-Repo-Master (Master key for repo.sovring.org) <[email protected]>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:6 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:7 https://deb.nodesource.com/node_10.x bionic InRelease
Hit:8 https://repo.sovrin.org/sdk/deb xenial InRelease
Reading package lists... Done
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:6 https://deb.nodesource.com/node_10.x bionic InRelease
Hit:7 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:8 https://repo.sovrin.org/sdk/deb xenial InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
python-attr python-funcsigs python-pkg-resources python-pluggy python-py python-six
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
libindy
1 upgraded, 0 newly installed, 0 to remove and 214 not upgraded.
Need to get 2,805 kB of archives.
After this operation, 106 kB of additional disk space will be used.
Get:1 https://repo.sovrin.org/sdk/deb xenial/master amd64 libindy amd64 1.8.1~1040 [2,805 kB]
Fetched 2,805 kB in 2s (1,852 kB/s)
(Reading database ... 229981 files and directories currently installed.)
Preparing to unpack .../libindy_1.8.1~1040_amd64.deb ...
Unpacking libindy (1.8.1~1040) over (1.8.1~980) ...
Setting up libindy (1.8.1~1040) ...
Collecting base58
Using cached https://files.pythonhosted.org/packages/09/b2/21ac9591f055acc145afead895edeb73bbd69d95cf366fc5c2233f2434cb/base58-1.0.3-py3-none-any.whl
Installing collected packages: base58
Successfully installed base58-1.0.3
Collecting python3-indy
Collecting quart
Using cached https://files.pythonhosted.org/packages/62/3f/29831574b0136fce80c77638b7b544a28541cd6329722e6fe4c79f4b70f6/Quart-0.6.12-py3-none-any.whl
Collecting base58 (from python3-indy)
Using cached https://files.pythonhosted.org/packages/09/b2/21ac9591f055acc145afead895edeb73bbd69d95cf366fc5c2233f2434cb/base58-1.0.3-py3-none-any.whl
Collecting pytest-asyncio (from python3-indy)
Using cached https://files.pythonhosted.org/packages/55/8e/c45f87e42c2e905082e98753d4cb6b71e6da086c71bf15899a6aee285304/pytest_asyncio-0.10.0-py3-none-any.whl
Collecting pytest<3.7 (from python3-indy)
Using cached https://files.pythonhosted.org/packages/d8/e9/73246a565c34c5f203dd78bc2382e0e93aa7a249cdaeba709099eb1bc701/pytest-3.6.4-py2.py3-none-any.whl
Collecting blinker (from quart)
Collecting sortedcontainers (from quart)
Using cached https://files.pythonhosted.org/packages/13/f3/cf85f7c3a2dbd1a515d51e1f1676d971abe41bba6f4ab5443240d9a78e5b/sortedcontainers-2.1.0-py2.py3-none-any.whl
Collecting hypercorn<0.6,>=0.4 (from quart)
Downloading https://files.pythonhosted.org/packages/ab/22/60624d6a2f21bf41f285f4229e610aa7a290e9a72d73adb840c38cc64779/Hypercorn-0.5.3-py3-none-any.whl (42kB)
100% |████████████████████████████████| 51kB 3.0MB/s
Collecting click (from quart)
Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Collecting aiofiles (from quart)
Using cached https://files.pythonhosted.org/packages/cf/f2/a67a23bc0bb61d88f82aa7fb84a2fb5f278becfbdc038c5cbb36c31feaf1/aiofiles-0.4.0-py3-none-any.whl
Collecting multidict (from quart)
Using cached https://files.pythonhosted.org/packages/71/cc/ceb5b8c76e7a23212b9e0353053cc35a9d86c763d852a76d9b941fe81fbc/multidict-4.5.2-cp36-cp36m-manylinux1_x86_64.whl
Collecting jinja2 (from quart)
Using cached https://files.pythonhosted.org/packages/7f/ff/ae64bacdfc95f27a016a7bed8e8686763ba4d277a78ca76f32659220a731/Jinja2-2.10-py2.py3-none-any.whl
Collecting itsdangerous (from quart)
Using cached https://files.pythonhosted.org/packages/76/ae/44b03b253d6fade317f32c24d100b3b35c2239807046a4c953c7b89fa49e/itsdangerous-1.1.0-py2.py3-none-any.whl
Collecting setuptools (from pytest<3.7->python3-indy)
Using cached https://files.pythonhosted.org/packages/d1/6a/4b2fcefd2ea0868810e92d519dacac1ddc64a2e53ba9e3422c3b62b378a6/setuptools-40.8.0-py2.py3-none-any.whl
Collecting six>=1.10.0 (from pytest<3.7->python3-indy)
Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting atomicwrites>=1.0 (from pytest<3.7->python3-indy)
Using cached https://files.pythonhosted.org/packages/52/90/6155aa926f43f2b2a22b01be7241be3bfd1ceaf7d0b3267213e8127d41f4/atomicwrites-1.3.0-py2.py3-none-any.whl
Collecting pluggy<0.8,>=0.5 (from pytest<3.7->python3-indy)
Using cached https://files.pythonhosted.org/packages/f5/f1/5a93c118663896d83f7bcbfb7f657ce1d0c0d617e6b4a443a53abcc658ca/pluggy-0.7.1-py2.py3-none-any.whl
Collecting py>=1.5.0 (from pytest<3.7->python3-indy)
Downloading https://files.pythonhosted.org/packages/76/bc/394ad449851729244a97857ee14d7cba61ddb268dce3db538ba2f2ba1f0f/py-1.8.0-py2.py3-none-any.whl (83kB)
100% |████████████████████████████████| 92kB 4.6MB/s
Collecting attrs>=17.4.0 (from pytest<3.7->python3-indy)
Downloading https://files.pythonhosted.org/packages/23/96/d828354fa2dbdf216eaa7b7de0db692f12c234f7ef888cc14980ef40d1d2/attrs-19.1.0-py2.py3-none-any.whl
Collecting more-itertools>=4.0.0 (from pytest<3.7->python3-indy)
Using cached https://files.pythonhosted.org/packages/ae/d4/d6bad4844831943dd667510947712750004525c5807711982f4ec390da2b/more_itertools-6.0.0-py3-none-any.whl
Collecting h2>=3.1.0 (from hypercorn<0.6,>=0.4->quart)
Using cached https://files.pythonhosted.org/packages/a6/b2/0348a08cce9980b15ef8607adc7f0534193fe25b9269daa0c327dc74f026/h2-3.1.0-py2.py3-none-any.whl
Collecting h11 (from hypercorn<0.6,>=0.4->quart)
Using cached https://files.pythonhosted.org/packages/f9/f3/8e4cf5fa1a3d8bda942a0b1cf92f87815494216fd439f82eb99073141ba0/h11-0.8.1-py2.py3-none-any.whl
Collecting wsproto>=0.13.0 (from hypercorn<0.6,>=0.4->quart)
Using cached https://files.pythonhosted.org/packages/74/18/92f1c6b570ac322d5cfdc9dd10c6ba863b153a38c664d7bc50df719b5815/wsproto-0.13.0-py2.py3-none-any.whl
Collecting pytoml (from hypercorn<0.6,>=0.4->quart)
Collecting typing-extensions (from hypercorn<0.6,>=0.4->quart)
Using cached https://files.pythonhosted.org/packages/0f/62/c66e553258c37c33f9939abb2dd8d2481803d860ff68e635466f12aa7efa/typing_extensions-3.7.2-py3-none-any.whl
Collecting MarkupSafe>=0.23 (from jinja2->quart)
Downloading https://files.pythonhosted.org/packages/b2/5f/23e0023be6bb885d00ffbefad2942bc51a620328ee910f64abe5a8d18dd1/MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting hpack<4,>=2.3 (from h2>=3.1.0->hypercorn<0.6,>=0.4->quart)
Using cached https://files.pythonhosted.org/packages/8a/cc/e53517f4a1e13f74776ca93271caef378dadec14d71c61c949d759d3db69/hpack-3.0.0-py2.py3-none-any.whl
Collecting hyperframe<6,>=5.2.0 (from h2>=3.1.0->hypercorn<0.6,>=0.4->quart)
Using cached https://files.pythonhosted.org/packages/19/0c/bf88182bcb5dce3094e2f3e4fe20db28a9928cb7bd5b08024030e4b140db/hyperframe-5.2.0-py2.py3-none-any.whl
Installing collected packages: base58, setuptools, six, atomicwrites, pluggy, py, attrs, more-itertools, pytest, pytest-asyncio, python3-indy, blinker, sortedcontainers, hpack, hyperframe, h2, h11, wsproto, pytoml, typing-extensions, hypercorn, click, aiofiles, multidict, MarkupSafe, jinja2, itsdangerous, quart
Successfully installed MarkupSafe-1.1.1 aiofiles-0.4.0 atomicwrites-1.3.0 attrs-19.1.0 base58-1.0.3 blinker-1.4 click-7.0 h11-0.8.1 h2-3.1.0 hpack-3.0.0 hypercorn-0.5.3 hyperframe-5.2.0 itsdangerous-1.1.0 jinja2-2.10 more-itertools-6.0.0 multidict-4.5.2 pluggy-0.7.1 py-1.8.0 pytest-3.6.4 pytest-asyncio-0.10.0 python3-indy-1.8.1 pytoml-0.1.20 quart-0.6.12 setuptools-40.8.0 six-1.12.0 sortedcontainers-2.1.0 typing-extensions-3.7.2 wsproto-0.13.0
./install.sh: line 109: cd: /usr/local/lib/python3.7/site-packages: No such file or directory
./install.sh: line 109: cd: /usr/local/lib/python3.6/site-packages: No such file or directory
Error: failed on line 109.
Intermittent error occurring at proof creation. Often fixed by running again.
WARNING:indy.libindy:_do_call: Function indy_prover_search_credentials_for_proof_req returned error 113
Traceback (most recent call last):
File "claims.py", line 160, in <module>
run_coroutine(run)
File "/Users/theo/ANVIL/sovrin/sovrin_utilities.py", line 55, in run_coroutine
loop.run_until_complete(coroutine())
File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "claims.py", line 116, in run
requested_predicates, non_issuer_attributes)
File "/Users/theo/ANVIL/sovrin/proofs.py", line 36, in create_proof_of_credential
prover['proof_request'], None)
File "/usr/local/lib/python3.7/site-packages/indy/anoncreds.py", line 989, in prover_search_credentials_for_proof_req
prover_search_credentials_for_proof_req.cb)
indy.error.IndyError: ErrorCode.CommonInvalidStructure
Console log:
[2019-03-26 12:17:35,407] 127.0.0.1:40368 GET / 1.1 200 528 9528
Setting up pool...
_indy_loop_callback: Function returned error (<ErrorCode.PoolLedgerConfigAlreadyExistsError: 306>, 'Error: Pool ledger config already exists\n Caused by: Pool ledger config file with name "ANVIL" already exists\n')
_indy_loop_callback: Function returned error (<ErrorCode.PoolLedgerInvalidPoolHandle: 301>, 'Error: Invalid pool handle\n Caused by: Pool with the same name is already opened\n')
[2019-03-26 12:18:20,860] ERROR in app: Exception on request POST /setup
Traceback (most recent call last):
File "/home/aron/.local/lib/python3.6/site-packages/quart/app.py", line 1449, in handle_request
return await self.full_dispatch_request(request_context)
File "/home/aron/.local/lib/python3.6/site-packages/quart/app.py", line 1471, in full_dispatch_request
result = await self.handle_user_exception(error)
File "/home/aron/.local/lib/python3.6/site-packages/quart/app.py", line 892, in handle_user_exception
raise error
File "/home/aron/.local/lib/python3.6/site-packages/quart/app.py", line 1469, in full_dispatch_request
result = await self.dispatch_request(request_context)
File "/home/aron/.local/lib/python3.6/site-packages/quart/app.py", line 1517, in dispatch_request
return await handler(**request_.view_args)
File "prover.py", line 47, in setup
prover, pool_handle = await common_setup(prover, pool_handle, 'prover')
File "/home/aron/develop/ANVIL/anvil/common.py", line 17, in common_setup
_, pool_handle = await setup_pool('local')
File "/home/aron/develop/ANVIL/anvil/sovrin/setup.py", line 41, in setup_pool
pool_['handle'] = await pool.open_pool_ledger(pool_['name'], None)
File "/home/aron/.local/lib/python3.6/site-packages/indy/pool.py", line 82, in open_pool_ledger
open_pool_ledger.cb)
indy.error.IndyError: (<ErrorCode.PoolLedgerInvalidPoolHandle: 301>, 'Error: Invalid pool handle\n Caused by: Pool with the same name is already opened\n')
Error:
Using /usr/lib/python3/dist-packages
Finished processing dependencies for oef==0.2.0
Traceback (most recent call last):
File "scripts/setup_test.py", line 32, in
from git import Repo, RemoteProgress, InvalidGitRepositoryError
ModuleNotFoundError: No module named 'git'
Error: failed on line 72.
On Ubuntu:
installed Docker
installed python -m pip install pygithub
ran script.
Any ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.