GoogleCloudPlatform / gsutil

A command line tool for interacting with cloud storage services.
Apache License 2.0
864 stars 331 forks source link

Failure to load deprecated libraries leads to misleading error message for users #1759

Open h4xnoodle opened 6 months ago

h4xnoodle commented 6 months ago

This try : except leads to a misleading error message if the nested dependency of, say load_pkcs12, no longer exists

It seems like the HAVE_OPENSSL value https://github.com/GoogleCloudPlatform/gsutil/blob/a872f98b59bad2bb72010afb9b0b90aa91ec5d0c/gslib/commands/signurl.py#L65

leads to the user error message of CommandException: The signurl command requires the pyopenssl library (try pip install pyopenssl or easy_install pyopenssl) which leads to confusion about how to proceed.

Workaround: install the current n-1 version of pyopenssl: pip3 install pyopenssl==23.2.0 which does indeed work

Test case: gsutil signurl -d 10m <some file...>

Related: https://github.com/GoogleCloudPlatform/gsutil/issues/1753