alexcg1 / example-pdf-search

Search PDFs using Jina, DocArray and Jina Hub
55 stars 17 forks source link

the environment ero #4

Open xiaoxiongfeng opened 2 years ago

xiaoxiongfeng commented 2 years ago

I use my environment, this project is ok; but I want to use a new environment by requirements.txt, it have ero

Traceback (most recent call last): File "app.py", line 184, in main() File "/home/xxf/.conda/envs/pdf/lib/python3.8/site-packages/click/core.py", line 1128, in call return self.main(args, kwargs) File "/home/xxf/.conda/envs/pdf/lib/python3.8/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/home/xxf/.conda/envs/pdf/lib/python3.8/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/xxf/.conda/envs/pdf/lib/python3.8/site-packages/click/core.py", line 754, in invoke return __callback(args, **kwargs) File "app.py", line 174, in main index(num_docs=num_docs) File "app.py", line 105, in index print(chunks[0].content) File "/home/xxf/.conda/envs/pdf/lib/python3.8/site-packages/docarray/array/mixins/getitem.py", line 52, in getitem return self._get_doc_by_offset(int(index)) File "/home/xxf/.conda/envs/pdf/lib/python3.8/site-packages/docarray/array/storage/memory/getsetdel.py", line 55, in _get_doc_by_offset return self._data[offset] IndexError: list index out of range

xiaoxiongfeng commented 2 years ago

indexer/rep-0@348585[E]:ValueError('Document[2011, 2012, 2013, 2014, 2636, 2637, 2638, 2639, 3409, 3410, 3411, 3412, 4034, 4035, 4036, 4037, 4038, 4039, 4040, 4041, 4663, 4664, 4665, 4666, 5436, 5437, 5438, 5439, 6061, 6062, 6063, 6064, 6065, 6066, 6067, 6068, 6690, 6691, 6692, 6693].embedding is None. Can not stack into embeddings.') add "--quiet-error" to suppress the exception details Traceback (most recent call last): File "/home/xxf/.conda/envs/pdf/lib/python3.8/site-packages/jina/serve/runtimes/worker/init.py", line 136, in process_data return await self._data_request_handler.handle(requests=requests) File "/home/xxf/.conda/envs/pdf/lib/python3.8/site-packages/jina/serve/runtimes/request_handlers/data_request_handler.py", line 109, in handle return_data = await self._executor.acall( File "/home/xxf/.conda/envs/pdf/lib/python3.8/site-packages/jina/serve/executors/init.py", line 247, in acall return await self.acall_endpoint__(req_endpoint, **kwargs) File "/home/xxf/.conda/envs/pdf/lib/python3.8/site-packages/jina/serve/executors/init.py", line 256, in acall_endpoint__ return func(self, *kwargs) File "/home/xxf/.conda/envs/pdf/lib/python3.8/site-packages/jina/serve/executors/decorators.py", line 140, in arg_wrapper return fn(executor_instance, args, kwargs) File "/home/xxf/.jina/hub-package/zb38xlt4/executor.py", line 92, in search docs[traversal_left].match(self._index[traversal_right], match_args) File "/home/xxf/.conda/envs/pdf/lib/python3.8/site-packages/docarray/array/mixins/match.py", line 73, in match match_docs = darray.find( File "/home/xxf/.conda/envs/pdf/lib/python3.8/site-packages/docarray/array/mixins/find.py", line 192, in find _result = self._find( File "/home/xxf/.conda/envs/pdf/lib/python3.8/site-packages/docarray/array/storage/memory/find.py", line 90, in _find return self._find_nn(query, cdist, limit, normalization, metric_name) File "/home/xxf/.conda/envs/pdf/lib/python3.8/site-packages/docarray/array/storage/memory/find.py", line 107, in _find_nn dists = cdist(query, self.embeddings, metric_name) File "/home/xxf/.conda/envs/pdf/lib/python3.8/site-packages/docarray/array/mixins/content.py", line 25, in embeddings return unravel(self, 'embedding') File "/home/xxf/.conda/envs/pdf/lib/python3.8/site-packages/docarray/math/ndarray.py", line 26, in unravel raise ValueError( ValueError: Document[2011, 2012, 2013, 2014, 2636, 2637, 2638, 2639, 3409, 3410, 3411, 3412, 4034, 4035, 4036, 4037, 4038, 4039, 4040, 4041, 4663, 4664, 4665, 4666, 5436, 5437, 5438, 5439, 6061, 6062, 6063, 6064, 6065, 6066, 6067, 6068, 6690, 6691, 6692, 6693].embedding is None. Can not stack into embeddings.