-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestpythonPull requests that update Python codePull requests that update Python code
Description
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:
- Add the
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. - Parse it to a dictionary BASETIME_ERROR_CODES outside the
BaseTimeBucketclass. - Add a function to get the error code from the dictionary and if not found, give an "Unrecognized status code".
Of course I am happy to hear about other suggestions on how to solve this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestpythonPull requests that update Python codePull requests that update Python code


