Skip to content

copy crashes with AttributeError #15

@mfeif

Description

@mfeif

I have a fresh install of pdftools v 2.0.2 (installed via pipx in an isolated venv on python3.10). Trying to get started, I first found #11 also with this line:

pdftools copy --output start.pdf --pages "1-33" src.pdf

I got:

usage: pdftools copy [-h] [-o OUTPUT] [-p PAGES [PAGES ...]] [-y] src
pdftools copy: error: the following arguments are required: src

So I tried with the -y:

pdftools copy --output start.pdf --pages "1-33" -y src.pdf

and:

Traceback (most recent call last):
  File "/Users/mjf/.local/bin/pdftools", line 8, in <module>
    sys.exit(main())
  File "/Users/mjf/.local/pipx/venvs/pdftools/lib/python3.10/site-packages/pdftools/_cli.py", line 266, in main
    pdf_copy(ARGS.input, ARGS.output, ARGS.pages, ARGS.y)
AttributeError: 'Namespace' object has no attribute 'input'

Even if one removes all the "optional" command line args, this crashes:

pdftools copy src.pdf                Mon Jan 17 15:29:53 2022
Traceback (most recent call last):
  File "/Users/mjf/.local/bin/pdftools", line 8, in <module>
    sys.exit(main())
  File "/Users/mjf/.local/pipx/venvs/pdftools/lib/python3.10/site-packages/pdftools/_cli.py", line 266, in main
    pdf_copy(ARGS.input, ARGS.output, ARGS.pages, ARGS.y)
AttributeError: 'Namespace' object has no attribute 'input'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions