Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'predict' #57

Closed
laifuchicago opened this issue Apr 8, 2020 · 3 comments
Closed
Assignees

Comments

@laifuchicago
Copy link

To author:
When we do the inference, the system would have the following error,

File "inference.py", line 149, in ask
top_k_reader=request.top_k_reader, filters=request.filters,
File "/workspace/haystack/haystack/finder.py", line 57, in get_answers
results = self.reader.predict(question=question,
AttributeError: 'NoneType' object has no attribute 'predict'

Do you have any idea? Thank you

@tanaysoni
Copy link
Contributor

Hi @laifuchicago, it seems from the error message that the Finder in the API doesn't have a reader instance. Let's narrow down the issue together. Can you provide the following details:

  • how is the FINDERS variable initialized in inference.py? If possible, could you share your complete inference.py file?
  • what commit of Haystack you're working with?
  • are you using the doc-qa orfaq-qa endpoint?

@tanaysoni tanaysoni self-assigned this Apr 8, 2020
@laifuchicago
Copy link
Author

laifuchicago commented Apr 8, 2020

fac-qa
Now, we have solved this problem, thanks.
But the new problem is when we use faq-qa, it would show 500 Internal server error, but it's ok with doc-qa, do you have any idea?

@tanaysoni
Copy link
Contributor

moved this issue to #58

masci pushed a commit that referenced this issue Nov 27, 2023
Include only required files in built wheel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants