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

exceptions from generators shouldn't be silently ignored #54

Closed
OriHoch opened this issue Nov 27, 2018 · 4 comments
Closed

exceptions from generators shouldn't be silently ignored #54

OriHoch opened this issue Nov 27, 2018 · 4 comments
Assignees
Labels
bug Something isn't working dataflows

Comments

@OriHoch
Copy link
Contributor

OriHoch commented Nov 27, 2018

reproduction

from dataflows import Flow, printer

def generator():
  for i in range(5):
    raise Exception()
    yield {"i": i}

Flow(generator(), printer()).process()

Expected

Exception

Actual

no exception, empty resource

@OriHoch
Copy link
Contributor Author

OriHoch commented Nov 27, 2018

related to inferring schema, moving exception below the yield raises it

from dataflows import Flow, printer

def generator():
  for i in range(5):
    yield {"i": i}
    raise Exception()

Flow(generator(), printer()).process()

@akariv
Copy link
Member

akariv commented Nov 27, 2018

Interesting find!
Are you looking into it?

@OriHoch
Copy link
Contributor Author

OriHoch commented Nov 27, 2018

not at the moment (probably not anytime soon)

@akariv akariv self-assigned this Nov 27, 2018
@akariv
Copy link
Member

akariv commented Nov 27, 2018

👍 assigning to me then

@akariv akariv added the bug Something isn't working label Nov 27, 2018
@akariv akariv closed this as completed in 556e435 Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dataflows
Projects
None yet
Development

No branches or pull requests

2 participants