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

Use enry if it's already installed in PATH #3

Open
bzz opened this issue Sep 20, 2017 · 3 comments
Open

Use enry if it's already installed in PATH #3

bzz opened this issue Sep 20, 2017 · 3 comments
Labels

Comments

@bzz
Copy link

bzz commented Sep 20, 2017

Right now, after clean clone and installing all requirements

virtualenv -p python3 .venv
source .venv/bin/activate
git clone git@github.com:src-d/tmsc.git
cd tmsc
pip install -r requirements.txt

Run command python -m tmsc https://github.com/apache/spark results in

Number of documents: 112273
WARNING:topic_detector:No BOW cache was loaded.
Traceback (most recent call last):
  File "/<>/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/<>/3.6/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/<>/tmsc/tmsc/__main__.py", line 71, in <module>
    sys.exit(main())
  File "/<>/tmsc/tmsc/__main__.py", line 61, in main
    "timeout": args.timeout})
  File "<>/tmsc/tmsc/topic_detector.py", line 77, in __init__
    **(repo2bow_kwargs or {}))
  File "/<>/tmsc/tmsc/topic_detector.py", line 21, in __init__
    super().__init__(**kwargs)
  File "/<>/tmsc/.venv/lib/python3.6/site-packages/ast2vec/repo2/base.py", line 71, in __init__
    self._cloner.find_linguist(linguist)
  File "/<>/tmsc/.venv/lib/python3.6/site-packages/ast2vec/cloning.py", line 167, in find_linguist
    linguist)
FileNotFoundError: ./enry was not found. Install it: python3 -m ast2vec enry

Although latest Enry binary is available in the PATH

$ enry                                                                                                           
14.29%	Dockerfile
14.29%	Text
71.43%	Python
``
@bzz
Copy link
Author

bzz commented Sep 20, 2017

Quick search of ./enry reveals the --linguist flag.

Will re-try with python -m tmsc --linguist enry https://github.com/apache/spark

@bzz
Copy link
Author

bzz commented Sep 20, 2017

--linguist solves the issue.

Although it would still be nice to auto-detect enry binary in PATH by default

@vmarkovtsev
Copy link
Collaborator

Thanks for reporting, it should indeed be detected from PATH, looks like a defaults flaw in ast2vec.

@smola smola added the bug label Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants