-
Notifications
You must be signed in to change notification settings - Fork 13
Question about running social smell showcase in the window system #147
-
Package version: Perceval: 0.21.2, Jsonlite: 1.8.4, Data.table: 1.14.6 git_checkout(git_branch,git_repo_path)
[1] "Your branch is up to date with 'origin/master'."
project_git <- parse_gitlog(perceval_path,git_repo_path)
Warning: running command '"git" --git-dir C:/Users/mliu0/Documents/GitHub/thrift/.git log --raw --numstat --pretty=fuller --decorate=full --parents --reverse --topo-order -M -C -c > /tmp/gitlog.log' had status 128 I searched online and there were some resources that said status 128 could be the authorization issue. So I went to the terminal and ran the command “gh auth login”, and logged in with my github account, but it didn't solve anything. Error in eval(bysub, x, parent.frame()) : object 'data.Author' not found
5. eval(bysub, x, parent.frame())
4. eval(bysub, x, parent.frame())
3.`[.data.table`(perceval_parsed, , .(file = unlist(data.files[[1]]$file),
added = unlist(data.files[[1]]$added), removed = unlist(data.files[[1]]$removed)),
, by = list(data.Author, data.AuthorDate, data.commit, data.Commit,
data.CommitDate, data.message)) at parser.R#65
2. perceval_parsed[, .(file = unlist(data.files[[1]]$file), added = unlist(data.files[[1]]$added),
removed = unlist(data.files[[1]]$removed)), , by = list(data.Author,
data.AuthorDate, data.commit, data.Commit, data.CommitDate,
data.message)] at parser.R#65
1.parse_gitlog(perceval_path, git_repo_path) I checked the parser.R #65, and it is these lines of code: # Column data.files is a data.table. Unlist, so perceval_parsed is a table instead of a table of tables.
perceval_parsed <- perceval_parsed[, .(file=unlist(data.files[[1]]$file),
added=unlist(data.files[[1]]$added),
removed=unlist(data.files[[1]]$removed)),, by = list(data.Author,
data.AuthorDate,
data.commit,
data.Commit,
data.CommitDate,
data.message)] So I tried to run perceval in the command line “perceval git [git_repo_local_path] –json-line” to check if my perceval will return json output or not, and it returned the json output, so I think perceval is working with github repo local path. But when I tried to run the command mentioned in this line of code in terminal; # Parsed JSON output.
perceval_output <- system2(perceval_path,
args = c('git', '--git-log',gitlog_path,git_uri,'--json-line'),
stdout = TRUE,
stderr = FALSE) It returned mliu0@DESKTOP-S5N440V MINGW64 /d/Github/kaiaulu
$ C:/Users/mliu0/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0/LocalCache/local-packages/Python310/Scripts/perceval git --git-log C:/Users/mliu0/Documents/GitHub/thrift/.git
https://github.com/apache/thrift.git --json-line
[2023-02-07 10:40:21,426] - Sir Perceval is on his quest.
[2023-02-07 10:40:21,428] - Fetching commits: 'https://github.com/apache/thrift.git' git repository from 1970-01-01 00:00:00+00:00 to 2100-01-01 00:00:00+00:00; all branches
[2023-02-07 10:40:21,470] - Error!: git command - fatal: unable to access 'https://github.com/apache/thrift.git/': getaddrinfo() thread failed to start
[2023-02-07 10:40:21,470] - Sir Perceval completed his quest. I think there is some issue with accessing the repo in url, so I tried “perceval git [git_url] in command line, and it returned the following error: mliu0@DESKTOP-S5N440V MINGW64 /d/Github/kaiaulu
$ perceval git https://github.com/apache/thrift.git
[2023-02-07 10:48:25,426] - Sir Perceval is on his quest.
[2023-02-07 10:48:25,445] -Error! : git command - fatal: could not create leading directories of 'C:\Users\mliu0/.perceval/repositories/https://github.com/apache/thrift.git-git' I not sure what am I supposed to do to run social smell on window system. Any advice will be really appreciated. Thank you. |
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 3 comments · 9 replies
-
Hi Malia, I edited your original message a bit. For future reference, you can use ```r to define code blocks :) In regards to your issue, I see you have a Windows path:
Kaiaulu has only been tested on OS X and Unix (this is noted on the README), so you may run into some issues or not be able to run it at all. But if you still want to try: The parse function expects you to have the git file locally, not on a URL (have a look at some of the .config files versioned under |
Beta Was this translation helpful? Give feedback.
All reactions
-
I tried perceval 0.12.24
and it returned json output in terminal. But it still returned the following:
|
Beta Was this translation helpful? Give feedback.
All reactions
-
I noticed your error changed between your original question and more recently. Here it seems the system2 call went through and could run Perceval, and the error was in parsing the json. Then, when you change the version to an older one, it can't find. Did I misunderstand the error changed? |
Beta Was this translation helpful? Give feedback.
All reactions
-
I think because I modified parser.R
to
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Can you try the older Perceval version using the original code format, and pointing to the recommended path? It seems to be > perceval_parsed <- data.table(jsonlite::stream_in(textConnection(perceval_output),verbose = FALSE))
Error: parse error: premature EOF
{"backend_name":"Git","backend_
(right here) ------^ In this format Perceval is being found on the path, but the issue is the file that Perceval outputs instead. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi, thank you very much for your help and advice. I couldn't install an older version of Perceval because I couldn't install Dulwich. As a result, I set up a dual system with Ubuntu and Windows and managed to make it work on Ubuntu. However, I made a mistake while setting up the dual system and had to reinstall my Windows system and reset everything to factory settings. I don't have anything on my Windows system right now. |
Beta Was this translation helpful? Give feedback.
All reactions
-
It seems it is being unable to find where perceval binary is to execute. Could you attach your tools.yml here? |
Beta Was this translation helpful? Give feedback.
All reactions
-
Sorry I can't attach yml file here. Here is the code in my tools.yml
|
Beta Was this translation helpful? Give feedback.
All reactions
-
That works! Could you move Perceval binary somewhere else on your computer? Maybe your Desktop, for example. Maybe there is an issue with the path formation. As far as I recall, the Windows machine's path formation is different, |
Beta Was this translation helpful? Give feedback.
All reactions
-
I moved it to my desktop, it works in terminal when I typed
or I moved it to my D drive, it works in terminal
Result:
But it doesn't work in social smell
or
or
|
Beta Was this translation helpful? Give feedback.
That works!
Could you move Perceval binary somewhere else on your computer? Maybe your Desktop, for example. Maybe there is an issue with the path formation.
As far as I recall, the Windows machine's path formation is different,
\
instead of/
, which may be why your system2 call is not finding Perceval.