Skip to content
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

Succesful datapackage casts now error when publishing #11

Open
2 tasks
givadis opened this issue Apr 21, 2018 · 2 comments
Open
2 tasks

Succesful datapackage casts now error when publishing #11

givadis opened this issue Apr 21, 2018 · 2 comments

Comments

@givadis
Copy link

givadis commented Apr 21, 2018

In order to submit an issue, please ensure you can check the following. Thanks!

  • Declare which version of Python you are using (python --version)
  • Declare which operating system you are using

I have a working example of my fiscal data on openspending (data is linked at the end of the page):

When I try to reload the cvs I get now an error:

dump.to_path
ERROR :Failed to cast row {'id': 1}
ERROR :1) Field "id" can't cast value "1" for type "string" with format "default"
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/datapackage_pipelines/lib/dump/dumper_base.py", line 93, in schema_validator
schema.cast_row(to_cast)
File "/usr/local/lib/python3.6/site-packages/tableschema/schema.py", line 152, in cast_row
raise exceptions.CastError(message, errors=errors)
tableschema.exceptions.CastError: There are 1 cast errors (see exception.errors)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/datapackage_pipelines/specs/../lib/dump/to_path.py", line 31, in
PathDumper()()
File "/usr/local/lib/python3.6/site-packages/datapackage_pipelines/lib/dump/dumper_base.py", line 47, in call
finalizer=self.finalize
File "/usr/local/lib/python3.6/site-packages/datapackage_pipelines/wrapper/wrapper.py", line 69, in spew
for rec in res:
File "/usr/local/lib/python3.6/site-packages/datapackage_pipelines/lib/dump/dumper_base.py", line 122, in row_counter
for row in resource:
File "/usr/local/lib/python3.6/site-packages/datapackage_pipelines/lib/dump/dumper_base.py", line 251, in rows_processor
for row in resource:
File "/usr/local/lib/python3.6/site-packages/datapackage_pipelines/lib/dump/dumper_base.py", line 98, in schema_validator
raise ValueError(row) from e
ValueError: {'id': 1}

@akariv
Copy link
Member

akariv commented Apr 21, 2018

Hey @givadis,

Which version of datapackage-pipelines-fiscal are you using?
Can you share your fiscal.source-spec.yaml file?

@givadis
Copy link
Author

givadis commented Apr 22, 2018

Hi @akariv I am using the official packager from openspending.org. As far as I know this is kind of a black box and I don't have the information you ask for. At least I haven't seen anything like that in my workspace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants