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 1.7.3 is failing in installing required tools #365

Open
ATahhan opened this issue Mar 1, 2023 · 1 comment
Open

Invoke 1.7.3 is failing in installing required tools #365

ATahhan opened this issue Mar 1, 2023 · 1 comment

Comments

@ATahhan
Copy link

ATahhan commented Mar 1, 2023

I was trying to install tools run invoke install-tools as part of this installation process

I faced an issue when running it with [email protected]:

Traceback (most recent call last):
  File "/opt/homebrew/bin/invoke", line 8, in <module>
    sys.exit(program.run())
             ^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/invoke/program.py", line 373, in run
    self.parse_collection()
  File "/opt/homebrew/lib/python3.11/site-packages/invoke/program.py", line 465, in parse_collection
    self.load_collection()
  File "/opt/homebrew/lib/python3.11/site-packages/invoke/program.py", line 699, in load_collection
    module, parent = loader.load(coll_name)
                     ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/invoke/loader.py", line 76, in load
    module = imp.load_module(name, fd, path, desc)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/imp.py", line 245, in load_module
    return load_package(name, filename)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/imp.py", line 217, in load_package
    return _load(spec)
           ^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 721, in _load
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Users/ammaraltahhan/go/src/github.com/DataDog/datadog-agent/tasks/__init__.py", line 8, in <module>
    from . import (
  File "/Users/ammaraltahhan/go/src/github.com/DataDog/datadog-agent/tasks/agent.py", line 19, in <module>
    from .build_tags import filter_incompatible_tags, get_build_tags, get_default_build_tags
  File "/Users/ammaraltahhan/go/src/github.com/DataDog/datadog-agent/tasks/build_tags.py", line 217, in <module>
    @task
     ^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/invoke/tasks.py", line 331, in task
    return klass(args[0], **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/invoke/tasks.py", line 76, in __init__
    self.positional = self.fill_implicit_positionals(positional)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/invoke/tasks.py", line 167, in fill_implicit_positionals
    args, spec_dict = self.argspec(self.body)
                      ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/invoke/tasks.py", line 153, in argspec
    spec = inspect.getargspec(func)
           ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?

Following on this discussion, it seemed like this issue was resolved in invoke 2.0.0, and indeed, by changing the requirements.txt file locally to bump invoke to 2.0.0, I was able to run invoke install-tools successfully.

I believe we just need to merge this bump PR #348

@julien-lebot
Copy link
Contributor

Hey @ATahhan, it seems like invoke was bumped to 2.2.0, can we close this issue?

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

2 participants