We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using Python 3.6.9 with pathvalidate 2.1.0:
import argparse from pathvalidate.argparse import validate_filename_arg, validate_filepath_arg parser = argparse.ArgumentParser() parser.add_argument('--s3-bucket', type=str, help='check authentication repo for bucket names') parser.add_argument('--input-path', type=validate_filepath_arg) parser.add_argument('--output-path', type=validate_filepath_arg) args = parser.parse_args(['download', '--s3-bucket', 'default', '--input-path', '/path/to/somewhere.txt', '--output-path', '/path/to/somewhere.txt'])
python3 example_bug.py usage: example_bug.py [-h] [--s3-bucket S3_BUCKET] [--input-path INPUT_PATH] [--output-path OUTPUT_PATH] example_bug.py: error: argument --input-path: reason=MALFORMED_ABS_PATH, target-platform=universal, description=an invalid absolute file path (/path/to/somewhere.txt) for the platform (universal). specify an appropriate platform or 'auto'.
The error is raised in: def validate_abspath(self, value: PathType) -> None: ...
def validate_abspath(self, value: PathType) -> None:
if self._is_universal() and any([is_posix_abs, is_nt_abs]): raise err_object
The text was updated successfully, but these errors were encountered:
Change platform of validate_filepath_arg/sanitize_filepath_arg to 'au…
2e25504
…to': #11
@freelanceAndy Thank you for your report.
Please try to upgrade pathvalidate package to 2.2.0 and re-execute. I believe the latest version fixed the issue.
pathvalidate
2.2.0
Sorry, something went wrong.
Thanks for your swift response! Works great now.
No branches or pull requests
Using Python 3.6.9 with pathvalidate 2.1.0:
The error is raised in:
def validate_abspath(self, value: PathType) -> None:
...
The text was updated successfully, but these errors were encountered: