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

TypeError: 'bool' object has no attribute '__getitem__' #13

Closed
fluffels opened this issue Dec 28, 2018 · 0 comments
Closed

TypeError: 'bool' object has no attribute '__getitem__' #13

fluffels opened this issue Dec 28, 2018 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@fluffels
Copy link

Version 1.0.5 currently fails with the following stack trace:

Traceback (most recent call last):
  File "run.py", line 71, in <module>
    data = prepare_dataset(test_sentences, word_to_id, char_to_id, lower, True)
  File "~/src/Neural-ParsCit/loader.py", line 151, in prepare_dataset
    tags = [tag_to_id[w[-1]] for w in s]
TypeError: 'bool' object has no attribute '__getitem__'

The cause of the problem is a mismatch between the parameter list:

loader.py:128: def prepare_dataset(sentences, word_to_id, char_to_id, tag_to_id, lower=False, zeros=False):

And the call site:

run.py:71: data = prepare_dataset(test_sentences, word_to_id, char_to_id, lower, True)

Version 1.0.4 does not have this issue.

@kylase kylase added the bug Something isn't working label Dec 31, 2018
@kylase kylase self-assigned this Dec 31, 2018
@kylase kylase closed this as completed in 9f59121 Jan 4, 2019
kylase added a commit that referenced this issue Jan 4, 2019
Small hacks to fix #13 due to lack of tags in the inference stage
kylase added a commit that referenced this issue Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants