Python write_stream sample returns AttributeError when run

Open
#1 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker, python
Domain
databases

Research direction

Reproduce the failure by running write_stream.py against the server started with the documented Docker command, then compare it with list_streams.py. Inspect the stream lookup in write_stream.py and verify the sample's expected stream setup. Done means the sample works against a fresh server or clearly documents the required setup without the AttributeError.

Written by the indexing model from the issue text.

Description

Hi,

I am running a local timebase server using docker using the following command:

docker run --rm -d -p 8011:8011 --name=timebase-server --ulimit nofile=65536:65536 finos/timebase-ce-server:6.1

This allows me to run the list_streams.py sample successfully.

However, when I run the write_stream.py sample I get the following error:

Connected to dxtick://localhost:8011
Connection dxtick://localhost:8011 closed.
Traceback (most recent call last):
  File "write_stream.py", line 28, in <module>
    loader = stream.createLoader(tbapi.LoadingOptions())
AttributeError: 'NoneType' object has no attribute 'createLoader'

A cursory look at the code leads me to believe that the bitfinex stream does not exist in the timebase server so the person who wrote this sample was probably pointing to a timebase server that had already been primed in some way. So this sample does not stand by itself and needs some unknown setup.

I have attempted to create a stream instead of opening it but I get further errors due to the stream not being setup correctly (as expected):

No message types defined for stream at DxApiImpl::TickLoaderImpl *DxApiImpl::TickLoaderImpl::open(

I hope that is enough info to reproduce.

Dominant language
Java
Stars
9
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.