question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

python 2.7.10 windows powershell

when I type:

> git comit -am 'test'
> fuck

it gives me something that is completely weird:

C:\Python27\lib\site-packages\win_unicode_console\__init__.py:27: RuntimeWarning: sys.stdin.encoding == 'utf-8', whereas sys.stdout.encoding == None, readline hook consumer may assume they are the same
  readline_hook.enable(use_pyreadline=use_pyreadline)
git commit -am 'test' [enter/↑/↓/ctrl+c]

and then give an exception:

Traceback (most recent call last):
  File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\thefuck.exe\__main__.py", line 9, in <module>
  File "C:\Python27\lib\site-packages\thefuck\main.py", line 80, in main
    fix_command()
  File "C:\Python27\lib\site-packages\thefuck\main.py", line 32, in fix_command
    selected_command = select_command(corrected_commands)
  File "C:\Python27\lib\site-packages\thefuck\ui.py", line 80, in select_command
    for action in read_actions():
  File "C:\Python27\lib\site-packages\thefuck\ui.py", line 13, in read_actions
    key = get_key()
  File "C:\Python27\lib\site-packages\thefuck\system\win32.py", line 25, in get_key
    return ch.decode(sys.stdout.encoding)
TypeError: decode() argument 1 must be string, not None

I think this is related to UTF-8 encoding in python2… I cannot add python3 to path, because my vim plugins will require python2 in the path…

Is there any way I can fix this?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
chantisnakecommented, Mar 23, 2016

Thanks, I just got the fix, it is awesome, but there is still decoding error like

�[1mgit commit -am 'test'�[0m [�[32menter�[0m/�[34m↑�[0m/�[34m↓�[0m/�[31mctrl+c�[0m]

this… Is there a way to fix this?

2reactions
nvbncommented, Mar 23, 2016

@chantisnake already in pip =)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unusual Behavior: Symptoms, Signs, Causes & Treatment
The observation of strange behavior depends at least in part upon the perceptions of the observer. For most people, behaviors that are observed...
Read more >
Behavior - unusual or strange
Unusual or strange behavior involves performing actions that are not normal for the person. Alternative Names. Acting strangely ...
Read more >
Bizarre/Psychotic Behavior
Extremely odd or eccentric behavior; Inappropriate or complete lack of emotion; Bizarre behavior that could indicate hallucinations; Strange beliefs that ...
Read more >
25 Weird Things Humans Do Every Day, and Why
25 Weird Things Humans Do Every Day, and Why · Introduction · Prefer one hand to another · Lie · Alter our bodies...
Read more >
What is BIZARRE BEHAVIOR? definition of ...
Psychology Definition of BIZARRE BEHAVIOR: adj. a general term for behavior that is out of the ordinary or far from normal. Markedly unusual...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found