pystorm / streamparse

Run Python in Apache Storm topologies. Pythonic API, CLI tooling, and a topology DSL.
http://streamparse.readthedocs.io/
Apache License 2.0
1.5k stars 218 forks source link

sparse submit error: TypeError: pre_submit() takes 3 positional arguments but 4 were given #401

Closed ltang78 closed 6 years ago

ltang78 commented 7 years ago

Using sparse submit to submit a topology to storm running on the localhost. There is full error message: Traceback (most recent call last): File "/usr/bin/sparse", line 11, in sys.exit(main()) File "/usr/lib/python3.4/site-packages/streamparse/cli/sparse.py", line 79, in main args.func(args) File "/usr/lib/python3.4/site-packages/streamparse/cli/submit.py", line 281, i n main timeout=args.timeout) File "/usr/lib/python3.4/site-packages/streamparse/cli/submit.py", line 165, i n submit_topology _pre_submit_hooks(override_name, env_name, env_config, options) File "/usr/lib/python3.4/site-packages/streamparse/cli/submit.py", line 100, i n _pre_submit_hooks pre_submit_fabric(topology_name, env_name, env_config, options) TypeError: pre_submit() takes 3 positional arguments but 4 were given

anuraguniyal commented 7 years ago

I faced similar problem, so fixed my fabfile.py

$ cat fabfile.py 
def pre_submit(topology_name, env_name, env_config, options):
dan-blanchard commented 7 years ago

With streamparse 3.10.0 we added options to the list of arguments sent to the pre_submit and post_submit hooks. I apologize for the backward incompatible change. We should have tried to apply introspection to see how many arguments the hook takes.

NoahLiot commented 6 years ago

Hello Guys,

First great work you guys are doing!

I am also affected by this issue. Any idea when a fix is coming?

This is an easy fix, but would be nice to have it fixed in version for automated deployment...

Cheers!