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 I test it using LoadFile(filename), it works.
But when I test it using S3FILE like below, it doesn't work. I'm using Python 3.
test = YourFirstValidator(S3File(path = None, bucket='buckets', key='key/file.csv'))
I installed package via "pip install vladiate"
But I found the code I downloaded is different with the code in github.
I downloaded this version "vladiate-0.0.20.dist-info".
I investigate the failures I faced. Found out the inputs.py in this version need an update.
I believe the issue was, the LoadFile returns list, but S3File returns str. So I added one line in bold below to make code works.
under class S3File(VladInput):
...
ret=obj.get()['Body'].read().decode('utf-8')
**Convert str to list ret = ret.splitlines()
...
I'm not a expert programmer. Not 100% sure this can fix all potential issues. But it do resolve my issue. I hope this can help to other people who faced same issue.
The text was updated successfully, but these errors were encountered:
Thanks who contributed to this package. It helps.
When I test it using LoadFile(filename), it works.
But when I test it using S3FILE like below, it doesn't work. I'm using Python 3.
test = YourFirstValidator(S3File(path = None, bucket='buckets', key='key/file.csv'))
I installed package via "pip install vladiate"
But I found the code I downloaded is different with the code in github.
I downloaded this version "vladiate-0.0.20.dist-info".
I investigate the failures I faced. Found out the inputs.py in this version need an update.
I believe the issue was, the LoadFile returns list, but S3File returns str. So I added one line in bold below to make code works.
under class S3File(VladInput):
...
ret=obj.get()['Body'].read().decode('utf-8')
**Convert str to list
ret = ret.splitlines()
...
I'm not a expert programmer. Not 100% sure this can fix all potential issues. But it do resolve my issue. I hope this can help to other people who faced same issue.
The text was updated successfully, but these errors were encountered: