finos / finos/symphony-bdk-python

Datahose config: disabling datafeed in yml causes a NoneType error

Open
#340 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
37
Forks
44
Avg merge
1d 2h
Merged PRs (30d)
11

Description

## 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
- MESSAGESENT

### 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
- MESSAGESENT

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.