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

__init__() got an unexpected keyword argument 'delivery_callback' #158

Open
aepace opened this issue Sep 27, 2021 · 3 comments
Open

__init__() got an unexpected keyword argument 'delivery_callback' #158

aepace opened this issue Sep 27, 2021 · 3 comments

Comments

@aepace
Copy link

aepace commented Sep 27, 2021

There's a chance that my installations of adc-streaming and hop-client are out-of-sync. This morning I updated both packages by installing from master:

pip install git+https://github.com/astronomy-commons/adc-streaming.git@master
pip install git+https://github.com/scimma/hop-client.git@master

Now whenever I try and initiate a Producer, I get the following error and traceback:

In [4]: from hop.auth import Auth

In [5]: auth=Auth("alexander.pace-ecbf9436","---password-password-password---")

In [6]: from hop import Stream

In [7]: stream = Stream(auth=auth)

In [8]: with stream.open("kafka://kafka.scimma.org/lvalert-dev.test_gstlal", "w") as s:
   ...:     s.write({"my": "message"})
   ...:
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-8-209793b98036> in <module>
----> 1 with stream.open("kafka://kafka.scimma.org/lvalert-dev.test_gstlal", "w") as s:
      2     s.write({"my": "message"})

~/djangoenv/lib/python3.7/site-packages/hop/io.py in open(self, url, mode, group_id)
    108             if group_id is not None:
    109                 warnings.warn("group ID has no effect when opening a stream in write mode")
--> 110             return Producer(broker_addresses, topics[0], auth=credential)
    111         elif mode == "r":
    112             if group_id is None:

~/djangoenv/lib/python3.7/site-packages/hop/io.py in __init__(self, broker_addresses, topic, **kwargs)
    376             topic=topic,
    377             delivery_callback=errors.raise_delivery_errors,
--> 378             **kwargs,
    379         ))
    380

TypeError: __init__() got an unexpected keyword argument 'delivery_callback'

An older installation on a different machine works as expected. For reference i'm installing from git to take advantage of functionality that's slated for the next release.

@aepace
Copy link
Author

aepace commented Sep 27, 2021

rolling back adc-streaming to this fixes the issue

@cnweaver
Copy link
Contributor

Sorry, yes, the master branches are known to be out of sync.
We kept hop-client using the old interface for now so that it remains compatible with the latest release of adc-streaming, since we figured most users (including hop developers besides me) are usually installing adc-streaming with pip. The plan was to update hop-client to the new interface once there's a new adc-streaming release.

@myNameIsPatrick
Copy link
Collaborator

This should be fixed with #155 in place.

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