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
When executing the following code I get the error below:
# Connect to the Measurements databasedatabase=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 name basetime_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 BaseTimeBucket class.
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.
The text was updated successfully, but these errors were encountered:
Hi Pablo,
The problem lies with the policy/permissions I created in AWS, unless you used a credential file from Crux?
The measurements in the 'datacrux' were made for Crux to view if they could use it for their systems. The Class I created will only look in the S3 buckets 'baec', I have not set any other buckets to be compatible with the SettlementRodMeasurementSeries.
About your suggestions: I can implement the error_codes inside the repository, with an "Unrecognized status code" added if we have new error codes in the future, which are not yet updated in the repository.
Hope this explains the situation, we can discus the suggestion and choice a solution to fix this.
Thanks for the reply. I used indeed the correct credentials for the bucket 'datacrux' (the ones you provides me months ago). So I was expecting the code to work. We want that the code works of course for 'baec', but it is also important that it works for any client of Basetime (such as 'Crux') so they can benefit from this repo.
Do you think that is achievable with the mentioned suggestions? At least regarding the error codes?
Perhaps something extra to take care is the region of the bucket. Are all the buckets always located in the same region? If that is not the case then the region should be also a variable.
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.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, undermeasurements/io
and with the namebasetime_error_codes.txt
and parse it in the filebasetime.py
but outside the BaseTimeBucket class with the name BASETIME_ERROR_CODES. It is perhaps good to add a function as in the filezbase.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:
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.BaseTimeBucket
class.Of course I am happy to hear about other suggestions on how to solve this issue.
The text was updated successfully, but these errors were encountered: