Skip to content

'invoke update' returns "Function has keyword-only parameters or annotations" #6170

Closed

Description

@csezenoglu

Deployment Method

  • Installer
  • Docker Development
  • Docker Production
  • Bare metal Development
  • Bare metal Production
  • Digital Ocean image
  • Other (please provide a link Steps to Reproduce

Describe the problem*

Hello, I have encountered an issue when I tried to run "invoke update" step with below logs:

Traceback (most recent call last): File "/usr/bin/invoke", line 11, in <module> load_entry_point('invoke==1.4.1', 'console_scripts', 'invoke')() File "/usr/lib/python3/dist-packages/invoke/program.py", line 373, in run self.parse_collection() File "/usr/lib/python3/dist-packages/invoke/program.py", line 465, in parse_collection self.load_collection() File "/usr/lib/python3/dist-packages/invoke/program.py", line 696, in load_collection module, parent = loader.load(coll_name) File "/usr/lib/python3/dist-packages/invoke/loader.py", line 76, in load module = imp.load_module(name, fd, path, desc) File "/usr/lib/python3.10/imp.py", line 235, in load_module return load_source(name, filename, file) File "/usr/lib/python3.10/imp.py", line 172, in load_source module = _load(spec) File "<frozen importlib._bootstrap>", line 719, in _load File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/home/inventree/src/tasks.py", line 352, in <module> def update(c, skip_backup=False, frontend: bool = False): File "/usr/lib/python3/dist-packages/invoke/tasks.py", line 338, in inner obj = klass( File "/usr/lib/python3/dist-packages/invoke/tasks.py", line 76, in __init__ self.positional = self.fill_implicit_positionals(positional) File "/usr/lib/python3/dist-packages/invoke/tasks.py", line 167, in fill_implicit_positionals args, spec_dict = self.argspec(self.body) File "/usr/lib/python3/dist-packages/invoke/tasks.py", line 153, in argspec spec = inspect.getargspec(func) File "/usr/lib/python3.10/inspect.py", line 1237, in getargspec raise ValueError("Function has keyword-only parameters or annotations" ValueError: Function has keyword-only parameters or annotations, use inspect.signature() API which can support them

I just changed below lines in the config.yaml file:

ENGINE: mysql
NAME: inventree
USER: myuser
PASSWORD: mypassword
#HOST: 'localhost'
#PORT: '3306'

media_root: '/home/inventree/data/media'

static_root: '/home/inventree/data/static'

backup_dir: '/home/inventree/data/backup'

Could you please help us about the issue?

Regards,
CS

Steps to Reproduce

I had followed the steps: https://docs.inventree.org/en/latest/start/install/
and got error at "Initialize Database" step with "invoke update" command.

Relevant log output

No response

Activity

  1. added
    question
    setup
    triage:not-checked
    on Jan 7, 2024
  2. SchrodingersGat commented on Jan 10, 2024

    @SchrodingersGat
    Member

    @csezenoglu thanks for reporting. This looks like an issue with the invoke tool - it would appear from the link that a minimum invoke version of 2.0.0 is required.

    Can you please try updating your invoke version pip install -U invoke and then running the command sequence again?

    If this indeed fixes the issue, we will update our minimum version requirements and associated documentation

  3. removed
    triage:not-checked
    on Jan 10, 2024
  4. added this to the 0.14.0 milestone on Jan 10, 2024
  5. csezenoglu commented on Jan 16, 2024

    @csezenoglu
    Author

    Updating invoke version resolved my issue.
    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionsetup

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions