pallets / click

Python composable command line interface toolkit
https://click.palletsprojects.com
BSD 3-Clause "New" or "Revised" License
15.64k stars 1.4k forks source link

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

Open andgineer opened 1 year ago

andgineer commented 1 year ago

@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:

bhuffman-usgs commented 4 months ago

Working on this at the 2024 PyCon sprint