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

gitinspector crashed on Windows 8 #12

Closed
GoogleCodeExporter opened this issue Aug 23, 2015 · 5 comments
Closed

gitinspector crashed on Windows 8 #12

GoogleCodeExporter opened this issue Aug 23, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

Reproduce the failure

1. Windows 8 install Git-1.8.3-preview20130601 with Advance(cheetah plugin)
2. Python 3.3
3. Run with Powershell or Cmd

What is the expected output? What do you see instead?
Expect normal outcome, but only get parts.

Please use labels and text to provide additional information.
Command Prompt Print:


PS C:\Users\ZhijieWang> cd Eclipse_WorkSpace
PS C:\Users\ZhijieWang\Eclipse_WorkSpace> py gitinspector/gitinspector.py 
PittClass
The following historical commit information, by author, was found in the 
repository:

←[1mAuthor                     Commits    Insertions      Deletions    % of 
changes←[0;0m
Zhijie Wang                      4           514            237          100.00

Traceback (most recent call last):
  File "gitinspector/gitinspector.py", line 196, in <module>
  File "gitinspector/gitinspector.py", line 188, in main
  File "gitinspector/gitinspector.py", line 81, in output
  File "C:\Users\ZhijieWang\Eclipse_WorkSpace\gitinspector\outputable.py", line 38, in output
    outputable.output_text()
  File "C:\Users\ZhijieWang\Eclipse_WorkSpace\gitinspector\blame.py", line 214, in output_text
    print(textwrap.fill(_(BLAME_INFO_TEXT) + ":", width=terminal.get_size()[0]) + "\n")
  File "C:\Users\ZhijieWang\Eclipse_WorkSpace\gitinspector\terminal.py", line 97, in get_size
    (width, height) = __get_size_windows__()
TypeError: 'NoneType' object is not iterable
PS C:\Users\ZhijieWang\Eclipse_WorkSpace> ls


    Directory: C:\Users\ZhijieWang\Eclipse_WorkSpace


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----         6/17/2013   7:22 PM            .metadata
d----         6/10/2013   3:22 PM            CodeJamQualificationRound
d----         6/10/2013   3:22 PM            CodeJamRound1B
d----         7/21/2013   9:42 PM            gitinspector
d----         6/10/2013   3:22 PM            Othelo
d----         7/19/2013   8:03 PM            PittClass
d----          7/9/2013   4:51 PM            RemoteSystemsTempFiles
d----         6/10/2013   3:22 PM            round1A
d----         6/10/2013   3:22 PM            Round1B
d----         6/10/2013   3:22 PM            SchoolConnect


PS C:\Users\ZhijieWang\Eclipse_WorkSpace>

Original issue reported on code.google.com by wangzhij...@gmail.com on 22 Jul 2013 at 1:49

@GoogleCodeExporter
Copy link
Author

This is an interesting bug. It seems the terminal fails to report width and 
height.
It works great under Windows 7 (and previous versions); but reading up on it it 
seems things have changed slightly in Windows 8 and people use yet another 
method to get the terminal size.

I will look into it shortly.

/Adam Waldenberg

Original comment by gitinspe...@ejwa.se on 22 Jul 2013 at 2:37

  • Changed title: gitinspector crashed on Windows 8
  • Changed state: Started
  • Added labels: OpSys-Windows, Priority-Critical
  • Removed labels: Priority-Medium

@GoogleCodeExporter
Copy link
Author

I don't have a Windows 8 installation; so you will have to assist me a little.

Reading around there seems to be a method used in conjunction with tput. Could 
you check if the tput command is available in your terminal in Windows 8? In 
that case, that command could be used to fetch the terminal size, executing the 
commands;

tput cols
tput lines

... should return the number of columns and lines of the current terminal.

/Adam Waldenberg

Original comment by gitinspe...@ejwa.se on 22 Jul 2013 at 1:06

@GoogleCodeExporter
Copy link
Author

Unfortunately, neither of them works in PowerShell or cmd prompt

PS C:\Users\ZhijieWang> tput cols
tput : The term 'tput' is not recognized as the name of a cmdlet, function, 
script file, or operable program. Che
the spelling of the name, or if a path was included, verify that the path is 
correct and try again.
At line:1 char:1
+ tput cols
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (tput:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\ZhijieWang> tput lines
tput : The term 'tput' is not recognized as the name of a cmdlet, function, 
script file, or operable pro
the spelling of the name, or if a path was included, verify that the path is 
correct and try again.
At line:1 char:1
+ tput lines
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (tput:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\ZhijieWang>


Original comment by wangzhij...@gmail.com on 22 Jul 2013 at 2:26

@GoogleCodeExporter
Copy link
Author

This issue was closed by revision 9b5e82bc2cdf.

Original comment by gitinspe...@ejwa.se on 22 Jul 2013 at 11:10

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

The terminal now falls back to default size (80*25) if the size of the terminal 
could not be determined. See the revision above for more information.

This is the correct behavior anyway (even if it shouldn't fail). Reading up on 
it the current method *SHOULD* work under Windows 8 as well. Something in your 
environment probably makes it fail. Maybe some missing modules in the Python 
installation? I will add some error printouts to stderr; when the terminal size 
can't be determined for some reason, so that it is easier to do something about 
it.

/Adam Waldenberg

Original comment by gitinspe...@ejwa.se on 22 Jul 2013 at 11:16

@adam-waldenberg adam-waldenberg self-assigned this Oct 9, 2015
@adam-waldenberg adam-waldenberg added this to the 0.3.1 milestone Oct 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants