Comments (7)
Same. As a workaround, I updated my shell wrapper to do the export PYTHONIOENCODING=utf-8
.
from gitinspector.
Here is the output:
print locale.getpreferredencoding() -> UTF-8
print sys.getdefaultencoding() -> ascii
print sys.stdout.encoding -> None
print sys.stdin.encoding -> None
I tried the the following:
export PYTHONIOENCODING=utf-8
And it worked like a charm!
Jenkins is happy :)
Yeah, I don't know if the terminal is mis-configured, and I agree with you that
it may not be the best assumption to set a default encoding if "None" is
detected. Maybe a potential "fix" is to detect "None" and tell the user to
export the environment variable with the correct encoding.
Thanks for the quick response! Great tool!
Original comment by [email protected]
on 11 Nov 2013 at 2:27
from gitinspector.
I also having this issue when the process runs detached:
Traceback (most recent call last): File "/usr/bin/gitinspector", line 9, in <module> load_entry_point('gitinspector==0.4.4', 'console_scripts', 'gitinspector')() File "/usr/lib/python2.7/dist-packages/gitinspector/gitinspector.py", line 105, in main argv = terminal.convert_command_line_to_utf8() File "/usr/lib/python2.7/dist-packages/gitinspector/terminal.py", line 122, in convert_command_line_to_utf8 argv.append(arg.decode(sys.stdin.encoding, "replace")) TypeError: decode() argument 1 must be string, not None
Was able to workaround adding export PYTHONIOENCODING=utf-8
:)
from gitinspector.
Hi. I run gitinspector on many remote (headless systems) without a hitch. This
just sounds to me like a misconfigured terminal? What does the following script
return?:
import locale
import sys
print locale.getpreferredencoding()
print sys.getdefaultencoding()
print sys.stdout.encoding
print sys.stdin.encoding
Gitinspector uses unicode internally; so it needs a reference point in order to
properly encode everything and anything into the right format.
It would be possible to just choose a default encoding when "None" is detected;
I don't know if this is the "correct" solution, though.
Also, if you know the encoding, you could try executing something like the
following on the terminal:
export PYTHONIOENCODING=utf-8; gitinspector.py <opts>
This forces sys.*.encoding into the encoding you specify.
/Adam Waldenberg
Original comment by [email protected]
on 9 Nov 2013 at 11:28
- Changed state: Accepted
- Added labels: Priority-Low
- Removed labels: Priority-Medium
from gitinspector.
Great! Good thing that it worked.
I have been looking around a bit in order to somehow improve the behavior. A
common solution seems to be to use the preferred encoding (if one is set). As
you proposed, a warning on stderr is probably in order also; just to let the
user know that something *might* be wrong with the settings of the terminal.
I'll keep this issue open until I have time to do something about it.
/Adam Waldenberg
Original comment by [email protected]
on 15 Nov 2013 at 12:37
from gitinspector.
I'll try to improve this before the next release.
Original comment by [email protected]
on 8 Jan 2014 at 2:48
- Added labels: Milestone-Release0.3.2, Usability
from gitinspector.
This issue was closed by revision 23bc5fbbea90.
Original comment by [email protected]
on 8 Jan 2014 at 5:06
- Changed state: Fixed
from gitinspector.
Related Issues (20)
- Brazilian Portuguese Translation
- Stability, Age, % in comments HOT 1
- AttributeError: 'Commit' object has no attribute 'timestamp' HOT 1
- Add Support for Dart HOT 3
- Ability to combine different names of the same author under the same person stats HOT 2
- Expand "Show" sections by default. HOT 1
- TypeError: 'bool' object is not iterable HOT 13
- AttributeError: 'NoneType' object has no attribute 'add_filediff' HOT 1
- Dockerfile and Dockerhub deployment for easy Windows execution HOT 2
- Authorless commits crash tool HOT 4
- Translation
- ModuleNotFoundError: No module named 'localization' (python 3.9) HOT 3
- AttributeError: 'Commit' object has no attribute 'sha' HOT 1
- Cannot use `gitinspector --help` outside of a repository HOT 1
- Specify which Python/gettext versions are currently supported
- Uncaught exception on unexisting folder
- Any interest for a gitinspector GUI with stand-alone Windows and Mac apps? HOT 2
- Gitinspector does not look at the css, fxml and csv files in the resource folder HOT 1
- How to use it on Win? HOT 1
- Add support for reStructuredText and Markdown
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitinspector.