You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since MirrorPath.from_s3_key() uses str.removesuffix(), it breaks when a non-str is passed. Checking for type would be nifty to save headaches.
Error when calling MirrorPath.from_s3_key(None)
File "C:\Users\Trevor\py-rogue-detection\ddb_tracking\grd_structure.py", line 122, in from_json
rogue_labels=MirrorPath.from_s3_key(json_dict["rogue_labels"]),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Trevor\miniconda3\envs\rogue-venv\Lib\site-packages\S3MP\mirror_path.py", line 50, in from_s3_key
s3_key = s3_key.removesuffix('/')
^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'removesuffix'
The text was updated successfully, but these errors were encountered:
Would preferred behavior be raise a warning and default to "", or something else?
If there's not any sort of default behavior, it seems like this would just move the AttributeError upstream.
We could also set the behavior via the configuration.
Since
MirrorPath.from_s3_key()
usesstr.removesuffix()
, it breaks when a non-str
is passed. Checking for type would be nifty to save headaches.Error when calling
MirrorPath.from_s3_key(None)
The text was updated successfully, but these errors were encountered: