Closed FredaPinto closed 5 years ago
Hi Team,
I just realizied cloc is dependency and i installed it now. Thanks.
thank you for using Graal @FredaPinto !
@FredaPinto Hi, I ran into the same problem. I tried to use pip3 install cloc to install the dependency but it doesn't work.
Hi @Julianbaozi
Cloc isn't a python package, sudo apt-get install cloc
.
Ref: https://github.com/chaoss/grimoirelab-graal#how-to-installcreate-the-executables
@valeriocos Thank you! It worked very well.
you're welcome @Julianbaozi
@valeriocos I installed cloc. but still got the error I'm using docker-compose to compute cocom.
Sorry for the inconvenience @Julianbaozi !
There is a specific docker image to use graal, however due to a change in a third-party library, the image cannot be built: https://github.com/chaoss/grimoirelab/issues/306
The workaround is to install cloc
inside the container, as follows:
docker exec -it <name-of-the-container> bash
Don't hesitate to write if you have any problem, thanks!
What if i use docker-compose? Can i install it in the container too?
On Mon, Apr 13, 2020 at 4:21 AM valerio notifications@github.com wrote:
Sorry for the inconvenience @Julianbaozi https://github.com/Julianbaozi !
There is a specific docker image https://github.com/chaoss/grimoirelab/tree/master/third-party to use graal, however due to a change in a third-party library, the image cannot be built: chaoss/grimoirelab#306 https://github.com/chaoss/grimoirelab/issues/306
The workaround is to install cloc inside the container, as follows:
- docker exec -it
bash - apt-get install cloc
Don't hesitate to write if you have any problem, thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/chaoss/grimoirelab-graal/issues/44#issuecomment-612860000, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKUX664SOJNKSUWZKTYGO7DRMLYTNANCNFSM4IDNLIMQ .
Yes, sorry for not being clear in the previous message. The part below works for docker and docker-compose.
The workaround is to install cloc inside the container, as follows:
- docker exec -it <name-of-the-container> bash
- apt-get install cloc
Once you have your docker-compose up and running, you can execute:
docker ps
to list the containers running and retrieve the name/id of the mordred containerdocker exec -it <name-of-the-mordred-container> bash
to enter in the containerapt-get instll cloc
(I don't think sudo is necessary).Thank you so much!
On Mon, Apr 13, 2020 at 6:45 AM valerio notifications@github.com wrote:
Yes, sorry for not being clear in the previous message. The part below works for docker and docker-compose.
The workaround is to install cloc inside the container, as follows:
- docker exec -it
bash - apt-get install cloc
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/chaoss/grimoirelab-graal/issues/44#issuecomment-612904626, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKUX66335O7MUZIEPEN4FGLRMMJPLANCNFSM4IDNLIMQ .
You're welcome! Don't hesitate to write if needed!
Hi Team,
I have installed Graal using pip command in virtualenv and trying to fetch data in python script so i was getting error. So i tried to fetch data from commandline and i m getting following error. Kindly suggest what i can be missing or is it some bug ?
(graal) freda@freda-HP-Laptop-15-bs0xx:~$ graal cocom https://github.com/nodejs/help --git-path /home/freda/nodejs [2019-07-14 12:14:50,084] - Starting the quest for the Graal. [2019-07-14 12:14:52,503] - Git worktree /tmp/worktrees/nodejs created! [2019-07-14 12:14:52,503] - Fetching commits: 'https://github.com/nodejs/help' git repository from 1970-01-01 00:00:00+00:00 to 2100-01-01 00:00:00+00:00; all branches [2019-07-14 12:14:53,236] - Git repository /home/freda/nodejs checked out! [2019-07-14 12:14:53,240] - Analysis failed at 9161c1807154ca3dc19dd0ac15106a108cce8cbe Traceback (most recent call last): File "/home/freda/venvs/graal/lib/python3.6/site-packages/perceval/backend.py", line 472, in run for item in items: File "/home/freda/venvs/graal/lib/python3.6/site-packages/perceval/backend.py", line 589, in fetch raise e File "/home/freda/venvs/graal/lib/python3.6/site-packages/perceval/backend.py", line 583, in fetch for item in items: File "/home/freda/venvs/graal/lib/python3.6/site-packages/perceval/backend.py", line 162, in fetch for item in self.fetch_items(category, kwargs): File "/home/freda/venvs/graal/lib/python3.6/site-packages/graal/graal.py", line 183, in fetch_items raise e File "/home/freda/venvs/graal/lib/python3.6/site-packages/graal/graal.py", line 176, in fetch_items commit['analysis'] = self._analyze(commit) File "/home/freda/venvs/graal/lib/python3.6/site-packages/graal/backends/core/cocom.py", line 142, in _analyze file_info = self.file_analyzer.analyze(local_path) File "/home/freda/venvs/graal/lib/python3.6/site-packages/graal/backends/core/cocom.py", line 191, in analyze cloc_analysis = self.cloc.analyze(kwargs) File "/home/freda/venvs/graal/lib/python3.6/site-packages/graal/backends/core/analyzers/cloc.py", line 119, in analyze message = subprocess.check_output(['cloc', file_path]).decode("utf-8") File "/usr/lib/python3.6/subprocess.py", line 336, in check_output *kwargs).stdout File "/usr/lib/python3.6/subprocess.py", line 403, in run with Popen(popenargs, **kwargs) as process: File "/usr/lib/python3.6/subprocess.py", line 709, in init restore_signals, start_new_session) File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'cloc': 'cloc'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/freda/venvs/graal/bin/graal", line 129, in
main()
File "/home/freda/venvs/graal/bin/graal", line 75, in main
cmd.run()
File "/home/freda/venvs/graal/lib/python3.6/site-packages/perceval/backend.py", line 480, in run
raise RuntimeError(str(e))
RuntimeError: [Errno 2] No such file or directory: 'cloc': 'cloc'