o19s/hello-ltr

Failure Running /tests/test.sh: TypeError: 'coroutine' object is not subscriptable

Closed this issue · 1 comments

I checked out a fresh copy of this repo on MacOS, ran ./tests/test.sh and got the failure below.

Is this a known issue and reproducible? I'm happy to take a deeper look with any guidance/feedback on this.

Thanks,
Mark


================================================
== RUN TESTS: 
== tests/run_most_nbs.py 
..EXECUTING NBS IN DIRECTORY: ./notebooks/
Running... ./notebooks/conversion-augmented-click-models.ipynb
/Users/macohen/IdeaProjects/OpenSearchWork/hello-ltrfresh/tests_venv/lib/python3.9/site-packages/debugpy/_vendored/pydevd/pydevd_plugins/extensions/__init__.py:4: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('pydevd_plugins.extensions')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  __import__('pkg_resources').declare_namespace(__name__)
/Users/macohen/IdeaProjects/OpenSearchWork/hello-ltrfresh/tests_venv/lib/python3.9/site-packages/pkg_resources/__init__.py:2349: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('pydevd_plugins')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(parent)
/Users/macohen/IdeaProjects/OpenSearchWork/hello-ltrfresh/tests_venv/lib/python3.9/site-packages/debugpy/_vendored/pydevd/pydevd_plugins/extensions/types/__init__.py:4: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('pydevd_plugins.extensions.types')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  __import__('pkg_resources').declare_namespace(__name__)
/Users/macohen/IdeaProjects/OpenSearchWork/hello-ltrfresh/tests_venv/lib/python3.9/site-packages/pkg_resources/__init__.py:2349: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('pydevd_plugins.extensions')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(parent)
E/usr/local/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tracemalloc.py:401: ResourceWarning: unclosed context <zmq.asyncio.Context() at 0x10af9d590>
  class DomainFilter(BaseFilter):
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/usr/local/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py:686: ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>
  _warn(f"unclosed event loop {self!r}", ResourceWarning, source=self)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
/usr/local/Cellar/python@3.9/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/unittest/case.py:614: RuntimeWarning: coroutine 'ZMQSocketChannel.get_msg' was never awaited
  outcome.errors.clear()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
.
======================================================================
ERROR: test_for_no_errors (__main__.RunMostNotebooksTestCase)
Run all nbs in directories at test_paths()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/macohen/IdeaProjects/OpenSearchWork/hello-ltrfresh/tests/notebook_test_case.py", line 42, in test_for_no_errors
    nb, errors = runner.run_notebook(nb, save_nb_path=NotebooksTestCase.SAVE_NB_PATH)
  File "/Users/macohen/IdeaProjects/OpenSearchWork/hello-ltrfresh/tests/runner.py", line 22, in run_notebook
    proc.preprocess(nb, {'metadata': {'path': dirname}})
  File "/Users/macohen/IdeaProjects/OpenSearchWork/hello-ltrfresh/tests_venv/lib/python3.9/site-packages/nbconvert/preprocessors/execute.py", line 405, in preprocess
    nb, resources = super(ExecutePreprocessor, self).preprocess(nb, resources)
  File "/Users/macohen/IdeaProjects/OpenSearchWork/hello-ltrfresh/tests_venv/lib/python3.9/site-packages/nbconvert/preprocessors/base.py", line 69, in preprocess
    nb.cells[index], resources = self.preprocess_cell(cell, resources, index)
  File "/Users/macohen/IdeaProjects/OpenSearchWork/hello-ltrfresh/tests_venv/lib/python3.9/site-packages/nbconvert/preprocessors/execute.py", line 438, in preprocess_cell
    reply, outputs = self.run_cell(cell, cell_index, store_history)
  File "/Users/macohen/IdeaProjects/OpenSearchWork/hello-ltrfresh/tests_venv/lib/python3.9/site-packages/nbconvert/preprocessors/execute.py", line 578, in run_cell
    exec_reply = self._poll_for_reply(parent_msg_id, cell, timeout)
  File "/Users/macohen/IdeaProjects/OpenSearchWork/hello-ltrfresh/tests_venv/lib/python3.9/site-packages/nbconvert/preprocessors/execute.py", line 479, in _poll_for_reply
    if msg['parent_header'].get('msg_id') == msg_id:
TypeError: 'coroutine' object is not subscriptable

----------------------------------------------------------------------
Ran 4 tests in 4.219s

FAILED (errors=1)
================================================
== TEARDOWN 
[+] Running 3/3
 ⠿ Container solr-solr-1  Removed                                                                                                                             1.8s
 ⠿ Volume solr_data       Removed                                                                                                                             0.0s
 ⠿ Network solr_default   Removed                                                                                                                             0.1s
[+] Running 4/4
 ⠿ Container elasticsearch-elasticsearch-1  Removed                                                                                                           6.7s
 ⠿ Container elasticsearch-kibana-1         Removed                                                                                                           2.5s
 ⠿ Volume elasticsearch_tlre-es-data        Removed                                                                                                           0.0s
 ⠿ Network elasticsearch_default            Removed                                                                                                           0.8s
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
================================================
> POOP!    Tests Failed 💩 For:
commit c101343aef9d4c43a1bacdc82f98089347e16553 (HEAD -> main, origin/main, origin/HEAD)
Author: David Fisher <dfisher@opensourceconnections.com>
Date:   Mon Feb 20 15:38:19 2023 -0500

    Fix labs (#87)
    
    * fix typos and bugs that got fixed while running live, but never fixed in the repo.
    
    * column is named clicks, not downloads
    
    * remove visualization exercise that isn't complete
    
    * copy the data directory too...
    
    * remove query cell that isn't part of the exercise.
    
    * Clean up and excise character name items to synchronize with the ES version of this exercise.
    
    * update lesson to not be fill in the blanks
    
    ---------
    
    Co-authored-by: David Fisher <dfisher@opensourcesolutions.com>
================================================
 ===============================================
 HELLO-LTR TEST DETAILS
 Containers Rebuilt? false
 Test Command: tests/run_most_nbs.py
================================================

This error follows from needing to update nbconvert (and some other packages) to newer versions. Fixing that has identified a second error in one of the ai-powered-search notebooks.