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

Search by words fails #187

Closed
olegs opened this issue Oct 23, 2019 · 1 comment
Closed

Search by words fails #187

olegs opened this issue Oct 23, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@olegs
Copy link
Member

olegs commented Oct 23, 2019

No description provided.

@olegs olegs added the bug Something isn't working label Oct 23, 2019
@olegs olegs self-assigned this Oct 23, 2019
@olegs
Copy link
Member Author

olegs commented Oct 24, 2019

Stacktrace:

AttributeError: 'WordListCorpusReader' object has no attribute '_LazyCorpusLoader__reader_cls'

Traceback (most recent call last)
File "/Users/oleg/miniconda3/envs/pubtrends/lib/python3.7/site-packages/flask/app.py", line 2463, in __call__
return self.wsgi_app(environ, start_response)
File "/Users/oleg/miniconda3/envs/pubtrends/lib/python3.7/site-packages/flask/app.py", line 2449, in wsgi_app
response = self.handle_exception(e)
File "/Users/oleg/miniconda3/envs/pubtrends/lib/python3.7/site-packages/flask/app.py", line 1866, in handle_exception
reraise(exc_type, exc_value, tb)
File "/Users/oleg/miniconda3/envs/pubtrends/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/Users/oleg/miniconda3/envs/pubtrends/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/Users/oleg/miniconda3/envs/pubtrends/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/oleg/miniconda3/envs/pubtrends/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Users/oleg/miniconda3/envs/pubtrends/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/Users/oleg/miniconda3/envs/pubtrends/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/oleg/miniconda3/envs/pubtrends/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/Users/oleg/work/pubtrends/models/app/app.py", line 187, in show_ids
papers=prepare_papers_data(data, source, comp, word, author, journal))
File "/Users/oleg/work/pubtrends/models/keypaper/paper.py", line 121, in prepare_papers_data
tokens = tokenize(word)
File "/Users/oleg/work/pubtrends/models/keypaper/utils.py", line 81, in tokenize
stop_words = set(stopwords.words('english'))
File "/Users/oleg/miniconda3/envs/pubtrends/lib/python3.7/site-packages/nltk/corpus/util.py", line 123, in __getattr__
self.__load()
File "/Users/oleg/miniconda3/envs/pubtrends/lib/python3.7/site-packages/nltk/corpus/util.py", line 91, in __load
corpus = self.__reader_cls(root, *self.__args, **self.__kwargs)
AttributeError: 'WordListCorpusReader' object has no attribute '_LazyCorpusLoader__reader_cls'
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object

@olegs olegs closed this as completed in 241230d Oct 24, 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

1 participant