-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate CSVw schema throws error #486
Comments
Running into problems duplicating this locally, as the same steps to follow run aground far earlier within create schema flow, throwing the following error method=POST path=/datasets format=*/* controller=DatasetsController action=create status=500
error='ActiveModel::UnknownAttributeError: unknown attribute 'owner_username' for DatasetFileSchema.' duration=487.74 view=0.00 db=0.00
ActiveModel::UnknownAttributeError - unknown attribute 'owner_username' for DatasetFileSchema.: Appears to relate to this part of validates_presence_of :owner_username, message: 'Please select an owner for the schema' |
A similar error is encountered if you follow these steps
In this sequence of steps the same method hangs but a different error is thrown: |
I reproduced the issue with the original instructions. The issue starts in
Furthermore, later in The solution is to create the tempfile, by doing something like:
This resolves the original issue. But now we see the error:
This is thrown by the following line in
This issue appears to be with the CSV Lint gem itself in the way that it handles CSVw files, since the supplied arguments are correct. The stack trace points to the issue being in |
Steps to Reproduce (for problems)
Add
spec/fixtures/valid-cotw.csv
dataset to Octopub file uploadAttach
spec/fixtures/schemas/csv-on-the-web-schema.json
for schemaClick upload
Octopub will hang
Current Behaviour (for problems)
The logs indicate that a problem occurs in the function
get_file_for_validation_from_file()
https://github.com/theodi/octopub/blob/master/app/models/dataset_file.rb#L156-L158This raises an exception
WARN: TypeError: no implicit conversion of StringIO into String
. It's not clear if this exception is what is causing the service to hangYour Environment
The text was updated successfully, but these errors were encountered: