jorisvandenbossche commented on code in PR #14764: URL: https://github.com/apache/arrow/pull/14764#discussion_r1036843440
########## python/pyarrow/fs.py: ########## @@ -183,11 +184,11 @@ def _resolve_filesystem_and_path( if not exists_locally: try: filesystem, path = FileSystem.from_uri(path) - except ValueError as e: + except pa.ArrowInvalid as e: # neither an URI nor a locally existing path, so assume that # local path was given and propagate a nicer file not found error # instead of a more confusing scheme parsing error - if "empty scheme" not in str(e): + if "URI" not in str(e): Review Comment: This might be too broad. I think the "Unrecognized filesystem type in URI: .." error is certainly one we want to keep raising. Otherwise we will assume a local file path, which will then error because of getting something that looks like a URI (and then the user might think URIs are not supported in general, while they maybe just made a typo in the URI type, or are using an unsupported file system) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org