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

TypeError: catching classes that do not inherit from BaseException is not allowed #178

Open
hodgesds opened this issue Apr 15, 2016 · 6 comments

Comments

@hodgesds
Copy link

This line blows up and should be changed to

except Exception as e:
@tschellenbach
Copy link
Owner

Hi Daniel,

That's interesting, what version of Python are you using?

@hodgesds
Copy link
Author

Python 3.5

@tschellenbach
Copy link
Owner

It works on 2.7 and 3.4...

@tschellenbach
Copy link
Owner

If you change exceptions=None to exceptions=tuple() does that work better?

@hodgesds
Copy link
Author

Side note is that I'm side loading the settings in order to get it to work with a flask app. It could be related to this Django bug, but I'm pretty close to figuring this out.

@tschellenbach
Copy link
Owner

So 3.5 also works for me. Both

except None as e:
and
except tuple() as e:
are valid

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