milvus-io / bootcamp

Dealing with all unstructured data, such as reverse image search, audio search, molecular search, video analysis, question and answer systems, NLP, etc.
https://milvus.io
Apache License 2.0
1.83k stars 561 forks source link

[BUG]: 'SequenceIterator' object is not iterable in file recommender_system.ipynb #1293

Open hyseimide opened 5 months ago

hyseimide commented 5 months ago

Is there an existing issue for this?

Current Behavior

TypeError                                 Traceback (most recent call last)
Cell In[30], [line 7](vscode-notebook-cell:?execution_count=30&line=7)
      [4](vscode-notebook-cell:?execution_count=30&line=4) search_string = "A comedy from the 1990s set in a hospital. The main characters are in their 20s and are trying to stop a vampire."
      [5](vscode-notebook-cell:?execution_count=30&line=5) results = search_for_movies(search_string)
----> [7](vscode-notebook-cell:?execution_count=30&line=7) for hits in iter(results):
      [8](vscode-notebook-cell:?execution_count=30&line=8)     for hit in hits:
      [9](vscode-notebook-cell:?execution_count=30&line=9)         print(hit.entity.get('title'))

TypeError: 'SequenceIterator' object is not iterable

Expected Behavior

Print the search result

Steps To Reproduce

Run All the code cells. The error occurred in the last code cell.

TypeError: 'SequenceIterator' object is not iterable

Software version

Milvus: 2.4.0
Server: Ubuntu 22.04
Client: PyMilvus 2.4.0
Python: 3.12.2

Anything else?

Maybe:

for hits in results: