click icon indicating copy to clipboard operation
click copied to clipboard

for argument type File, `lazy` does not work on Windows

Open andgineer opened this issue 3 years ago • 1 comments

@click.argument( "csv_file", default="goodreads_library_export.csv", type=click.File( "r", lazy=True, ), nargs=1, )

That work as expected in Linux - if I do not open the file it works even if there is no such file. But in Windows it fails https://github.com/andgineer/goodreads-export/actions/runs/3867907090/jobs/6593008354 `Usage: main [OPTIONS] [CSV_FILE] Try 'main --help' for help.

Error: Invalid value for '[CSV_FILE]': 'goodreads_library_export.csv': No such file or directory`

Environment:

  • Python version: 3.9
  • Click version: 8.1.3

andgineer avatar Jan 08 '23 16:01 andgineer

Working on this at the 2024 PyCon sprint

bhuffman-usgs avatar May 20 '24 22:05 bhuffman-usgs