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

parse_gitlog throws "object 'data.Author' not found' #108

Closed
carlosparadis opened this issue Jul 15, 2021 · 1 comment
Closed

parse_gitlog throws "object 'data.Author' not found' #108

carlosparadis opened this issue Jul 15, 2021 · 1 comment
Assignees
Labels
module:parser Anything associated to the parser module.

Comments

@carlosparadis
Copy link
Member

Problem

I updated the config file (apr.yml) to use my locations of the .git folder the .mbox file. In the step of parsing the Gitlog (line 86), I get the following error message:

Warning in system2(perceval_path, args = c("git", "--git-log", gitlog_path, :

running command ''/home/user/.local/lib/python3.8/site-packages/perceval' git --git-log /tmp/gitlog.log > /home/user/Documents/apr/.git --json-line 2>/dev/null' had status 126

Error in eval(bysub, x, parent.frame()) : object 'data.Author' not found

Solution

I manually inspected the path and it appears that I first got the path: ~/.local/lib/python3.8/site-packages/perceval Whereas I should have had: ~/.local/bin/perceval This fixed this problem.

@carlosparadis carlosparadis added the module:parser Anything associated to the parser module. label Jul 15, 2021
@carlosparadis carlosparadis pinned this issue Jul 15, 2021
@carlosparadis
Copy link
Member Author

This is a recurrent point of confusion. I need to think of some better error handling messages for this and the tools.yml. For now, I am pinning this issue. Thanks for catching this!

carlosparadis added a commit to waylonho/kaiaulu that referenced this issue Nov 13, 2023
- supressWarnings were removed from unit tests.
- Parameters to example() folder have been added for consistency
with other example functions.
- The commented unit test that checked empty repo has been "fixed".
More specifically, the code causing the issue to the test has been
addressed to fail more gracefully returning a value that can be
assessed with the unit test (this indirectly adresses sailuh#108).
- One of the examples and unit tests purpose was not clear and
the filter for large files was missing. This was corrected.
- Other small details.

Signed-off-by: Carlos Paradis <[email protected]>
carlosparadis added a commit that referenced this issue Nov 13, 2023
- More unit tests and example fake datasets were added

- One of the unit tests, that is to check empty git repo, 
actually relates to #108 and was further addressed.

Specifically, when using parse_gitlog() to parse an empty
repo (but existing repo, and therefore with 0 commits), 
calling the `git log` command will throw a fatal error, 
since it can't generate logs for 0 commits. 

The system call interprets that as a warning, returning 
a NULL object, instead of halting execution. Eventually, 
in the parse_gitlog() function, Perceval is called, likely
throwing another warning but also failing to halt 
execution. 

At some point, a transformation on the naming of the columns
will occur, including "data.Author" which is what Perceval calls
the author_name_email column. By then, it is data.table who throws
an error saying the column doesn't exist, leading to the problem 
experienced, which makes no sense to anyone reading. 

This commit also patches this problem, and Kaiaulu will now capture 
empty git logs errors and fail gracefully properly warning the user
either they pointed to a folder that doesn't exist, or that it lacks 
any commits.

---------

Signed-off-by: Waylon Ho <[email protected]>
Co-authored-by: Carlos Paradis <[email protected]>
Co-authored-by: Ruben Jacobo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:parser Anything associated to the parser module.
Projects
None yet
Development

No branches or pull requests

2 participants