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

invoke issue: Tasks must have an initial Context argument! #1

Closed
dongfengdejia opened this issue Apr 17, 2018 · 2 comments
Closed

invoke issue: Tasks must have an initial Context argument! #1

dongfengdejia opened this issue Apr 17, 2018 · 2 comments
Labels
bug Something isn't working invoke some issue rely on invoke library

Comments

@dongfengdejia
Copy link
Owner

I try use inv for execute some command, there report error:

Traceback (most recent call last):
File "C:\Python27\Scripts\inv-script.py", line 11, in
load_entry_point('invoke==0.22.1', 'console_scripts', 'inv')()
File "C:\Python27\lib\site-packages\invoke-0.22.1-py2.7.egg\invoke\program.py"
, line 282, in run
self.parse_collection()
File "C:\Python27\lib\site-packages\invoke-0.22.1-py2.7.egg\invoke\program.py"
, line 356, in parse_collection
self.load_collection()
File "C:\Python27\lib\site-packages\invoke-0.22.1-py2.7.egg\invoke\program.py"
, line 508, in load_collection
module, parent = loader.load(coll_name)
File "C:\Python27\lib\site-packages\invoke-0.22.1-py2.7.egg\invoke\loader.py",
line 69, in load
module = imp.load_module(name, fd, path, desc)
File "E:\github\RIDE_My\tasks.py", line 63, in
@task
File "C:\Python27\lib\site-packages\invoke-0.22.1-py2.7.egg\invoke\tasks.py",
line 290, in task
return Task(args[0], **kwargs)
File "C:\Python27\lib\site-packages\invoke-0.22.1-py2.7.egg\invoke\tasks.py",
line 63, in init
self.positional = self.fill_implicit_positionals(positional)
File "C:\Python27\lib\site-packages\invoke-0.22.1-py2.7.egg\invoke\tasks.py",
line 153, in fill_implicit_positionals
args, spec_dict = self.argspec(self.body)
File "C:\Python27\lib\site-packages\invoke-0.22.1-py2.7.egg\invoke\tasks.py",
line 148, in argspec
raise TypeError("Tasks must have an initial Context argument!")
TypeError: Tasks must have an initial Context argument!

@dongfengdejia dongfengdejia added bug Something isn't working invoke some issue rely on invoke library labels Apr 17, 2018
@dongfengdejia
Copy link
Owner Author

check the invoke github: pyinvoke/invoke#362
the issue should be fixed, but why there still reproduce at my environment?

@dongfengdejia
Copy link
Owner Author

issue fixed by add the "ctx" for all task function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invoke some issue rely on invoke library
Projects
None yet
Development

No branches or pull requests

1 participant