Comments (6)
Since there is no feedback for a week, I'm starting to work on it now.
from grimoirelab-sirmordred.
Hi @TieWay59
Sorry for the late reply have a look at chaoss/grimoirelab#479 (comment)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/worktrees/grimoirelab-toolkit-git': '/tmp/worktrees/grimoirelab-toolkit-git'
Change the worktree-path
to another path and try again, in that example I used /home/bitergia/worktrees
because the execution was in a Mordred container.
I hope it helps you.
from grimoirelab-sirmordred.
Thank you @zhquan. In my situation, I'm running it in the source code and docker way. So the directory is actually linked to the location in my local machine.
So I will still get the report:
2022-04-21 19:35:12,321 Error feeding raw from [Errno 2] No such file or directory: '/home/bitergia/worktrees'
I tried to create the directory manually, for example, /tmp/cocom/
and I use this directory in my setup.cfg
file. And then the report tells me [Errno 2] No such file or directory: 'cloc': 'cloc'
. I'm really confused about what's going on.
As I investigate deeper into this, I observed that every time I run the project script <worktrees-path>/grimoirelab-toolkit-git
would be removed by some process, because I even manually create this folder.
$ pwd
/tmp/worktrees/grimoirelab-toolkit-git
# here I run the script `python --raw --enrich --cfg ./setup.cfg --backends git cocom`
$ cd ..
$ ls # here nothing will be print out, grimoirelab-toolkit-git was removed.
Below is the full error log after [Errno 2] No such file or directory: 'cloc': 'cloc'
:
2022-04-21 19:30:05,398 Analysis failed at 9dc821962567715e5358b1192e1b15d8868d2b6c
2022-04-21 19:30:05,399 Error feeding raw from cocom (https://github.com/chaoss/grimoirelab-toolkit): [Errno 2] No such file or directory: 'cloc': 'cloc'
Traceback (most recent call last):
File "/root/miniconda3/envs/grimoirelab-sirmordred/lib/python3.7/site-packages/grimoire_elk/elk.py", line 171, in feed_backend
ocean_backend.feed(**params)
File "/root/miniconda3/envs/grimoirelab-sirmordred/lib/python3.7/site-packages/grimoire_elk/raw/elastic.py", line 231, in feed
self.feed_items(items)
File "/root/miniconda3/envs/grimoirelab-sirmordred/lib/python3.7/site-packages/grimoire_elk/raw/elastic.py", line 247, in feed_items
for item in items:
File "/root/miniconda3/envs/grimoirelab-sirmordred/lib/python3.7/site-packages/perceval/backend.py", line 316, in fetch
for item in self.fetch_items(category, **kwargs):
File "/root/miniconda3/envs/grimoirelab-sirmordred/lib/python3.7/site-packages/graal/graal.py", line 197, in fetch_items
raise e
File "/root/miniconda3/envs/grimoirelab-sirmordred/lib/python3.7/site-packages/graal/graal.py", line 190, in fetch_items
commit['analysis'] = self._analyze(commit)
File "/root/miniconda3/envs/grimoirelab-sirmordred/lib/python3.7/site-packages/graal/backends/core/cocom.py", line 212, in _analyze
file_info = self.analyzer.analyze(local_path)
File "/root/miniconda3/envs/grimoirelab-sirmordred/lib/python3.7/site-packages/graal/backends/core/cocom.py", line 272, in analyze
cloc_analysis = self.cloc.analyze(**kwargs)
File "/root/miniconda3/envs/grimoirelab-sirmordred/lib/python3.7/site-packages/graal/backends/core/analyzers/cloc.py", line 123, in analyze
message = subprocess.check_output(cloc_command).decode("utf-8")
File "/root/miniconda3/envs/grimoirelab-sirmordred/lib/python3.7/subprocess.py", line 411, in check_output
**kwargs).stdout
File "/root/miniconda3/envs/grimoirelab-sirmordred/lib/python3.7/subprocess.py", line 488, in run
with Popen(*popenargs, **kwargs) as process:
File "/root/miniconda3/envs/grimoirelab-sirmordred/lib/python3.7/subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "/root/miniconda3/envs/grimoirelab-sirmordred/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'cloc': 'cloc'
from grimoirelab-sirmordred.
Latest progress: I worked around it in a strange way.
[Errno 2] No such file or directory: 'cloc': 'cloc'
was caused by my system's lack of cloc install. chaoss/grimoirelab#479 (comment) inform me to install cloc.
I work around it by this operation sequence:
- install
cloc
(In my CentOS 7, runyum install cloc
) which theGetting-Started.md
didn't inform me to do it. - create two directory
mkdir /tmp/trythis
andmkdir /tmp/trythis/grimoirelab-toolkit-git
- use
mkdir /tmp/trythis
as theworktree-path
insetup.cfg
's[cocom]
section. - rerun the
Getting-Started.md
scriptpython --raw --enrich --cfg ./setup.cfg --backends git cocom
I have run and tested it many times, everything works out fine.
Here @zhquan, my new question is, Is there any better way to avoid these manual steps? or shall I add this into the Getting-Started.md
as a note to help the newcomers in the future?
from grimoirelab-sirmordred.
Hi @TieWay59, thanks for trying out the different methods and finding the way for yourself.
Below is the full error log after [Errno 2] No such file or directory: 'cloc': 'cloc':
Yes, this is something people have faced the error and it is reported in the Troubleshooting section too in the Getting-Started.md document. https://github.com/chaoss/grimoirelab-sirmordred/blob/master/Getting-Started.md#cloc-installation-
Here @zhquan, my new question is, Is there any better way to avoid these manual steps? or shall I add this into the Getting-Started.md as a note to help the newcomers in the future?
If you find any potential error, you can add it as an entry to the Troubleshooting section. Please feel free to open a PR.
As @vchrombie suggests, I just remove the cocom backend (see the command above) and leave only git, and this workaround this error fine. And actually, this error doesn't affect the demo result.
Also, I just suggested this to show you that there is nothing wrong with the micro mordred. The setup was working fine, just a small error which is related to cocom backend. You don't have to remove the cocom backend from the documentation because of it.
If your query is done, please feel free to close the issue.
from grimoirelab-sirmordred.
I will add this example to the Troubleshooting section later and close this issue for now.
It'll be nice if we can find out how this error happens and what's the mechanism behind it. Because it's very annoying to create every not found directory.
Any further discovery would be appreciated, and feel free to reopen this issue again.
from grimoirelab-sirmordred.
Related Issues (20)
- Connections to the Sorting Hat database are not closed HOT 1
- Cannot index gitlab issues from gitlab-com project HOT 5
- Getting all projects from enterprise Gitlab HOT 5
- Vulnerability CVE-2021-45960 - CVE-2019-19814 HOT 1
- [utils] Can't find `menu.yaml` and `aliases.json` in `/sirmordred` HOT 2
- custom port mariadb for grimorelabs HOT 1
- Only run one data source when the database is not created by Mordred HOT 7
- [requirements.txt] No matching distribution found for grimoireelk HOT 2
- [utils] Turn on the help arg option in `micro.py` HOT 3
- SirMordred did not install with Python 3.9 (but did with Python 3.8) HOT 5
- sirmordred/micro.py execution halts with connection issue HOT 5
- Is it possible to add more than a label to the repositories HOT 1
- How to skip lfs object when clonging project HOT 5
- Add prefix to aliases entries
- Jira integration appears to be non-functional HOT 2
- "Limit of total fields [1000] in index [github2-pull_raw] has been exceeded" error for "github2:pull"
- grimoirelab dashboard no result found error
- Read secrets from another file
- Add devcontainer to use codespaces as dev environment
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grimoirelab-sirmordred.