Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to /revocation/registries/created without parameters fails with the following error #1821

Closed
WadeBarnes opened this issue Jun 17, 2022 · 2 comments

Comments

@WadeBarnes
Copy link
Contributor

A call to /revocation/registries/created without parameters should work. However in some cases it fails with the following error.

2022-06-17 20:23:10,552 aries_cloudagent.core.dispatcher ERROR Handler error: rev_regs_created
Traceback (most recent call last):
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/tasks.py", line 180, in _step
    result = coro.send(None)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/revocation/routes.py", line 591, in rev_regs_created
    found = await IssuerRevRegRecord.query(session, tag_filter)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/messaging/models/base_record.py", line 333, in query
    result.append(cls.from_storage(record.id, vals))
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/messaging/models/base_record.py", line 122, in from_storage
    return cls(**params)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/revocation/models/issuer_rev_reg_record.py", line 91, in __init__
    record_id, state=state or IssuerRevRegRecord.STATE_INIT, **kwargs
TypeError: __init__() got an unexpected keyword argument 'issuance_type'
2022-06-17 20:23:10,553 aries_cloudagent.admin.server ERROR Handler error with exception: __init__() got an unexpected keyword argument 'issuance_type'

=================
Traceback (most recent call last):
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/admin/server.py", line 159, in ready_middleware
    return await handler(request)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/admin/server.py", line 196, in debug_middleware
    return await handler(request)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp_apispec/middlewares.py", line 45, in validation_middleware
    return await handler(request)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/admin/server.py", line 293, in check_token
    return await handler(request)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/admin/server.py", line 384, in setup_context
    return await task
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/tasks.py", line 180, in _step
    result = coro.send(None)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/revocation/routes.py", line 591, in rev_regs_created
    found = await IssuerRevRegRecord.query(session, tag_filter)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/messaging/models/base_record.py", line 333, in query
    result.append(cls.from_storage(record.id, vals))
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/messaging/models/base_record.py", line 122, in from_storage
    return cls(**params)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/revocation/models/issuer_rev_reg_record.py", line 91, in __init__
    record_id, state=state or IssuerRevRegRecord.STATE_INIT, **kwargs
TypeError: __init__() got an unexpected keyword argument 'issuance_type'
2022-06-17 20:23:10,553 aiohttp.server ERROR Error handling request
Traceback (most recent call last):
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/admin/server.py", line 159, in ready_middleware
    return await handler(request)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/admin/server.py", line 196, in debug_middleware
    return await handler(request)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aiohttp_apispec/middlewares.py", line 45, in validation_middleware
    return await handler(request)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/admin/server.py", line 293, in check_token
    return await handler(request)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/admin/server.py", line 384, in setup_context
    return await task
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/asyncio/tasks.py", line 180, in _step
    result = coro.send(None)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/revocation/routes.py", line 591, in rev_regs_created
    found = await IssuerRevRegRecord.query(session, tag_filter)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/messaging/models/base_record.py", line 333, in query
    result.append(cls.from_storage(record.id, vals))
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/messaging/models/base_record.py", line 122, in from_storage
    return cls(**params)
  File "/home/indy/.pyenv/versions/3.6.13/lib/python3.6/site-packages/aries_cloudagent/revocation/models/issuer_rev_reg_record.py", line 91, in __init__
    record_id, state=state or IssuerRevRegRecord.STATE_INIT, **kwargs
TypeError: __init__() got an unexpected keyword argument 'issuance_type'

The issue happens in this environment; https://lsbc-agent-admin-dev.apps.silver.devops.gov.bc.ca/api/doc#/revocation/get_revocation_registries_created

@ianco has access.

@andrewwhitehead
Copy link
Contributor

It looks like issuance_type was removed as a field from IssuerRevRegRecord in an older version. It should be added as an ignored parameter to the __init__ method.

@swcurran
Copy link
Contributor

Fixed by #1827. Please reopen if this is not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants