Unable to import from module haystack.indexing.utils
Is this an expected issue?
Versions
Package: farm-haystack version: 0.2.1
OS: Ubuntu 20.04
Bug
Following the Notebook https://github.com/deepset-ai/haystack/blob/master/tutorials/Tutorial1_Basic_QA_Pipeline.ipynb
I'm able import everything in the first import cell except for the imports from haystack.indexing.utils.
I just installed haystack through pip.
Step to reproduce error
from haystack.indexing.utils import convert_files_to_dicts
Error
from haystack.indexing.utils import convert_files_to_dicts
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
~/gitrepos/test_project/test2.py in
----> 5 from haystack.indexing.utils import convert_files_to_dicts
ModuleNotFoundError: No module named 'haystack.indexing.utils'
Hey @tobiasbj ,
The convert_files_to_dicts method was added after the 0.2.1 release.
We'll do another release soon, but for the meantime can you please install via:
! pip install git+git://github.com/deepset-ai/haystack.git@ef9e4f4467a2e265bad72b048a1a3186e40969b1
or from latest master
git clone https://github.com/deepset-ai/haystack.git
cd haystack
pip install --editable .
I encountered the same issue while using the _image: "deepset/haystack-cpu:latest"_ from docker-compose. If you build your own image based on the Dockerfile, it works. The deepset/haystack-cpu:latest isn't updated yet
Just updated the docker images on dockerhub
Should be fixed by now.
Hey @tholor ,
I'm still getting this error when installing from repository.
Step to reproduce error
from haystack.indexing.cleaning import clean_wiki_text
Error
ModuleNotFoundError Traceback (most recent call last)
2
3 from haystack import Finder
----> 4 from haystack.indexing.cleaning import clean_wiki_text
5 from haystack.indexing.utils import convert_files_to_dicts, fetch_archive_from_http
6 from haystack.reader.farm import FARMReader
ModuleNotFoundError: No module named 'haystack.indexing'
Is there anything I'm missing?
I found it. "haystack.indexing" was renamed. Use "haystack.preprocessor" instead.
Most helpful comment
I found it. "haystack.indexing" was renamed. Use "haystack.preprocessor" instead.