Not able to close the Price Feed from stream.close function

Options

Hi ,


Im using the Lseg Data Library ( ld.content.pricing.Definition ) for fetching the Price feed . When closing the stream using stream.close() statement ….i even put a pause of 5 seconds before calling stream.close ….the feed is not getting closed ..and getting following error in console :

Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1052, in _bootstrap_inner
self.run()
File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 989, in run
self._target(*self._args, **self._kwargs)
in
stream.close()
File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\lseg\data\content\pricing_stream_facade.py", line 133, in close
return super().close()
^^^^^^^^^^^^^^^
File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\lseg\data\delivery_stream_basestream.py", line 65, in close
return self._stream.close()
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\lseg\data\delivery_stream_basestream.py", line 172, in close
return self.state.close(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\lseg\data\delivery_stream\states_basestream_states.py", line 83, in close
return self.stream.do_close(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\lseg\data\delivery_stream_basestream.py", line 192, in do_close
self._do_close(*args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\lseg\data\content_universe_streams.py", line 450, in _do_close
futures.append(executor.submit(universe_stream.close))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\concurrent\futures\thread.py", line 172, in submit
raise RuntimeError('cannot schedule new futures after '
RuntimeError: cannot schedule new futures after interpreter shutdown


Thanks
Sumit

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @suchit_1

    Thank you for reaching out to us.

    It will be very helpful if you can share the runnable code that can be used to replicate this issue.

  • wasin.w
    wasin.w admin

    Hello @suchit_1

    It would be nice if you can share the library and Python version on your environment as well.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.