Closed why-not-try-calmer closed 3 years ago
I must be missing something. I am reading the content of the file attached below fetched over the network using the read() method on aiohttp's Response object. And then:
read()
Response
serialized: Dict[str,Any] = json.loads(raw) indexes[source]["index"] = Index.load(serialized)
gives me:
cls = <class 'lunr.index.Index'> serialized_index = {'config': {'indexing': 'full', 'lang': ['en'], 'min_search_length': 3, 'prebuild_index': False, ...}, 'docs': [{'loca...s featuring atomic transactional updates, and distros designed to run container loads.', 'title': 'Pre-install'}, ...]} @classmethod def load(cls, serialized_index): """Load a serialized index""" from lunr import __TARGET_JS_VERSION__ if isinstance(serialized_index, str): serialized_index = json.loads(serialized_index) > if serialized_index["version"] != __TARGET_JS_VERSION__: E KeyError: 'version'
Perhaps it's just late or it's just me. Any clue?
output.txt
Nevermind, I just needed some sleep.
I must be missing something. I am reading the content of the file attached below fetched over the network using the
read()
method on aiohttp'sResponse
object. And then:gives me:
Perhaps it's just late or it's just me. Any clue?
output.txt