finos / symphony-bdk-python

Symphony Python Bot Development Kit (BDK)
https://symphony-bdk-python.finos.org/
Apache License 2.0
31 stars 34 forks source link

Datahose config: disabling datafeed in yml causes a NoneType error #340

Open Alex-Nalin opened 6 months ago

Alex-Nalin commented 6 months ago

Bug Report

Steps to Reproduce:

Use the following in config.yml:

datafeed: enabled: false

datahose: enabled: true tag: fancyTag # optional tag that will be used when creating or reusing a datahose feed eventTypes: # mandatory field, events you want to receive

Expected Result:

The datahose should be used going forward

Actual Result:

Logs shows this trace:

Traceback (most recent call last): File "C:\Users\Alex.Nalin\PycharmProjects\SFDC-FED-NWI\main.py", line 728, in asyncio.run(run()) File "C:\Users\Alex.Nalin\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\Alex.Nalin\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 649, in run_until_complete return future.result() File "C:\Users\Alex.Nalin\PycharmProjects\SFDC-FED-NWI\main.py", line 53, in run async with SymphonyBdk(config) as bdk: File "C:\Users\Alex.Nalin\AppData\Local\Programs\Python\Python310\lib\site-packages\symphony\bdk\core\symphony_bdk.py", line 102, in init self._initialize_bot_services() File "C:\Users\Alex.Nalin\AppData\Local\Programs\Python\Python310\lib\site-packages\symphony\bdk\core\symphony_bdk.py", line 117, in _initialize_bot_services self._datafeed_loop = self._service_factory.get_datafeed_loop() File "C:\Users\Alex.Nalin\AppData\Local\Programs\Python\Python310\lib\site-packages\symphony\bdk\core\service_factory.py", line 156, in get_datafeed_loop if df_version.lower() == DatafeedVersion.V1.value.lower(): AttributeError: 'NoneType' object has no attribute 'lower'

Environment:

This issue occurs on all deployment, locally, via docker, on GKE...

Additional Context:

If removing the datafeed part and leaving the config.yml as below, then no error:

datahose: enabled: true tag: fancyTag # optional tag that will be used when creating or reusing a datahose feed eventTypes: # mandatory field, events you want to receive