TextRazor / textrazor-python

Python SDK for the TextRazor Text Analytics API
MIT License
20 stars 19 forks source link

TextRazorAnalysisException should not inherit from BaseException #1

Closed AdrianLC closed 9 years ago

AdrianLC commented 9 years ago

Hello,

Quoting the docs:

exception BaseException
    The base class for all built-in exceptions. It is not meant to be directly inherited by user-defined classes (for that, use Exception).

This seems to be causing an issue in our production systems by which we cannot see the actual tracebacks at all.

crayston commented 9 years ago

Thanks for reporting this @AdrianLC , it has now been fixed in master.

jkelly-kantar commented 1 year ago

Hi @crayston, This fix seems to have been reverted as part of a seemingly unrelated change https://github.com/TextRazor/textrazor-python/commit/1d842eefd97d0871f2f35df320c1ae94ac251097#diff-a4e316f94da35f8d85aec79c3576053375ce370556b2aca05229ec8712c7246d

TextRazorAnalysisException currently inherits from BaseException rather than Exception.

This is causing issues in our production system, because BaseExceptions are usually treated as fatal exceptions which can't be recovered from (which isn't true in any of the cases where TextRazorAnalysisException is being rased).

Please can this be fixed again?

crayston commented 1 year ago

Hi @jkelly-kantar, Well spotted, thank you for letting me know. This has been fixed again.

jkelly-kantar commented 1 year ago

Hi @jkelly-kantar, Well spotted, thank you for letting me know. This has been fixed again.

Thanks @crayston for the very speedy fix. Are you planning a release soon? We install the textrazor library through pypi so would need a release to benefit from this fix.

crayston commented 1 year ago

Sure, I've just pushed an updated 1.4.1 to pypi, so you should be good to go. Thanks again for the feedback!