However, If I change the raised exception in schema_avro.py to the following then the code becomes accessible:
if HAS_AVRO:
## Same Code
else:
raise Exception("Avro library support was not found. Make sure to install Pulsar client " +
"with Avro support: pip3 install 'pulsar-client[avro]'")
For reference, this is how the current exception is:
if HAS_AVRO:
## Same Code
else:
class AvroSchema(Schema):
def __init__(self, _record_cls, _schema_definition=None):
raise Exception("Avro library support was not found. Make sure to install Pulsar client " +
"with Avro support: pip3 install 'pulsar-client[avro]'")
def encode(self, obj):
pass
def decode(self, data):
pass
As it is clear that instead of raising an exception in the initialization of a class, I am just raising the exception as it is and now my entire code is accessible.
The exception raised for AvroSchema class when there is no Avro Library Support has a strange issue:
However, If I change the raised exception in schema_avro.py to the following then the code becomes accessible:
For reference, this is how the current exception is:
As it is clear that instead of raising an exception in the initialization of a class, I am just raising the exception as it is and now my entire code is accessible.