diff --git a/HISTORY.rst b/HISTORY.rst index 3673cae..52a7c82 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,13 @@ History ======= + +0.12.1 (2023-11-22) +------------------- + +* fix issue !6 with lowercase symbol names +* better error when aws clients use free data sample (!7) + 0.12.0 (2023-11-18) ------------------- diff --git a/lakeapi/main.py b/lakeapi/main.py index 01e5dae..01af24e 100644 --- a/lakeapi/main.py +++ b/lakeapi/main.py @@ -136,7 +136,7 @@ def partition_filter(partition: Dict[str, str]) -> bool: ) if symbols: - assert symbols[0].upper() == symbols[0] + assert symbols[0].upper() == symbols[0] or symbols[0][5:].upper() == symbols[0][5:] if exchanges: assert exchanges[0].upper() == exchanges[0] @@ -185,6 +185,11 @@ def partition_filter(partition: Dict[str, str]) -> bool: raise lakeapi.exceptions.NoFilesFound("No data found for your query in the free sample dataset. Please subscribe to access more data.") else: raise + except botocore.exceptions.UnauthorizedSSOTokenError as ex: + raise PermissionError( + "It seems you use a AWS account and try to access free data. Try using " + "`use_sample_data(anonymous_access=False)` or read https://github.com/crypto-lake/lake-api/issues/7." + ) else: # got error 404 both before and after the cache.clear() raise last_ex