Closed hanbeibei closed 8 years ago
I checked the stackoverflow, there is a solution: import os, and if os.environ['COMSPEC'] have multiple values. change it to a single one, but it not work at all..
I add 'shell = True' in c:\python27\lib\site-packages\gitinspector-0.4.4-py2.7.egg\gitinspector\config.py", line 32. and this problem seem fixed,
but there is another problem jump out:
$ gitinspector --version
Traceback (most recent call last):
File "c:\Anaconda3\Scripts\gitinspector-script.py", line 9, in
this is ...what should I do?
Hi @hanbeibei. First, are you using powershell when starting gitinspector? The error you are getting tells me that your shell can not map certain characters (it is unable to show them). You need to switch encoding to something that can handle UTF-8. I'm not really a Windows user, but powershell does by default iirc.
yes, I was using power shell first, then I start to use it in git shell. How should we switch the encoding?
another question is: if we use it under python 3, it seems unable to find the library under the same folder, should we add: from future import absolate_import??
Never tried gitinspector in git shell, so I have no idea about the supported encoding. From the above error I can see you had cp437 set as the encoding. If I recall you can use the "chcp" command in Windows to change encoding. Try "chcp 65001". It's an UTF-8 compatible code page.
gitinspector 0.4.4 fully supports python 3 and no changes should be needed. Maybe there is some problem in the way it's installing with Anaconda? I never tried it myself. Try changing imports to "from . import *" - this may fix your problem.
Hi @adam-waldenberg,
Great appreciate for your help, I tried to modify the code in your suggestion: "from . import *, and fixed the problem.
Thanks for you kindly help!!!
Hi @adam-waldenberg ,
I think your project is very good for statistics, which can generate pretty nice report in HTML format, have you thought to integrate it with Jenkins or sonarqube? this is actually I was doing, but in a hard code way: implement shell in Jenkins.
thanks again for making this nice project happen!
Hi. I have seen that people use it with Jenkins... However, a real plugin would have been cool. A nice solution would be to use the XML or JSON output and display the stats in a more integrated way with Jenkins.
I won't do it any time soon, but patches are welcome ;). I would gladly add a jenkins plugin to the project if somebody did one.
I'm closing this issue :).
PS C:\Users\oliver> gitinspector --version Traceback (most recent call last): File "c:\python27\Scripts\gitinspector-script.py", line 9, in
load_entry_point('gitinspector==0.4.4', 'console_scripts', 'gitinspector')()
File "c:\python27\lib\site-packages\gitinspector-0.4.4-py2.7.egg\gitinspector\gitinspector.py", line 121, in main
config.init(run)
File "c:\python27\lib\site-packages\gitinspector-0.4.4-py2.7.egg\gitinspector\config.py", line 55, in init
var = read_git_config_string(run.repo, "file-types")
File "c:\python27\lib\site-packages\gitinspector-0.4.4-py2.7.egg\gitinspector\config.py", line 51, in read_git_confi
g_string
string = read_git_config(repo, variable)
File "c:\python27\lib\site-packages\gitinspector-0.4.4-py2.7.egg\gitinspector\config.py", line 32, in read_git_confi
g
setting = subprocess.Popen(["git", "config", "inspector." + variable], bufsize=1, stdout=subprocess.PIPE).stdout
File "c:\python27\lib\subprocess.py", line 711, in init
errread, errwrite)
File "c:\python27\lib\subprocess.py", line 959, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified