When executing the following code I get the error below:
# Connect to the Measurements database
database = BaseTimeBucket(
credentials=Credentials(),
s3bucket="datacrux",
)

The error actually comes from the following line. I suspect it simply doesn't find the error_codes.txt in the bucket.

Since we are looking for a general solution, it is perhaps the best to add the error_codes.txt to the repo, under measurements/io and with the name basetime_error_codes.txt and parse it in the file basetime.py but outside the BaseTimeBucket class with the name BASETIME_ERROR_CODES. It is perhaps good to add a function as in the file zbase.py to get the error code and in case it is not found to add an "Unrecognized status code". See below:

In short, my suggestion is to:
Of course I am happy to hear about other suggestions on how to solve this issue.
When executing the following code I get the error below:
The error actually comes from the following line. I suspect it simply doesn't find the
error_codes.txtin the bucket.Since we are looking for a general solution, it is perhaps the best to add the
error_codes.txtto the repo, undermeasurements/ioand with the namebasetime_error_codes.txtand parse it in the filebasetime.pybut outside the BaseTimeBucket class with the name BASETIME_ERROR_CODES. It is perhaps good to add a function as in the filezbase.pyto get the error code and in case it is not found to add an "Unrecognized status code". See below:In short, my suggestion is to:
error_codes.txt(or even as a .json file already) to the repo under the namebasetime_error_codes. Note that this will mean you need to maintain the file up to date in the repo, with the advantage that you only need to add it properly in one place.BaseTimeBucketclass.Of course I am happy to hear about other suggestions on how to solve this issue.