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

rebuilding index fails #160

Open
ggthedev opened this issue Jul 15, 2023 · 1 comment
Open

rebuilding index fails #160

ggthedev opened this issue Jul 15, 2023 · 1 comment

Comments

@ggthedev
Copy link

Hi
A novice user who just discovered this wonderful utility, encountered the following error while trying the -r option.
Here is the complete error info:

~ ❯ cppman -r
Indexing 'https://cplusplus.com/reference/' (depth 1)...
Exception in thread Thread-1 (_worker):
Traceback (most recent call last):
File "/usr/local/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/Cellar/cppman/0.5.6/libexec/lib/python3.11/site-packages/cppman/crawler.py", line 248, in _worker
if self.process_document(url, content, depth):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/cppman/0.5.6/libexec/lib/python3.11/site-packages/cppman/main.py", line 247, in process_document
keywords = self._extract_keywords(content)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/cppman/0.5.6/libexec/lib/python3.11/site-packages/cppman/main.py", line 381, in _extract_keywords
soup = BeautifulSoup(text, "lxml")
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/cppman/0.5.6/libexec/lib/python3.11/site-packages/bs4/init.py", line 249, in init
raise FeatureNotFound(
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
=== Done https://cplusplus.com/reference/
Indexing 'https://en.cppreference.com/w/cpp' (depth 1)...
Exception in thread Thread-2 (_worker):
Traceback (most recent call last):
File "/usr/local/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/Cellar/cppman/0.5.6/libexec/lib/python3.11/site-packages/cppman/crawler.py", line 248, in _worker
if self.process_document(url, content, depth):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/cppman/0.5.6/libexec/lib/python3.11/site-packages/cppman/main.py", line 247, in process_document
keywords = self._extract_keywords(content)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/cppman/0.5.6/libexec/lib/python3.11/site-packages/cppman/main.py", line 381, in _extract_keywords
soup = BeautifulSoup(text, "lxml")
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/cppman/0.5.6/libexec/lib/python3.11/site-packages/bs4/init.py", line 249, in init
raise FeatureNotFound(
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?
=== Done https://en.cppreference.com/w/cpp
~ ❯

Please let me know is the issue related to Beautifulsoup? I am able to infer, some parser for lxml is missing, but not sure which one.

@y-src
Copy link

y-src commented Jan 4, 2024

I had the same issue and I suppose it is only present in the homebrew build as I tried with APT on Ubuntu and it works fine.
To fix the issue I installed lxml via brew - brew install python-lxml.

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