jgbarah / perceval-demos Goto Github PK
View Code? Open in Web Editor NEWSome demos for GrimoireLab/Perceval
Some demos for GrimoireLab/Perceval
The diff-test.py program as of today raises an UTF-8 related error in some circumstances. For example, with the git repository for git, I get the following (note that the command tries to force some specific commits to be included, to trigger the error:
$ python3 diff-test.py --repo git.repo/ --pkg git-2.6.4/ --logging info --step 1000 \
--after 2005-09-01 --before 2005-09-31 > diff-3.output
INFO:git command: git -C git.repo/ log --raw --numstat --pretty=fuller --decorate=full --parents -M -C -c --first-parent master --after 2005-09-01 --before 2005-09-31.
Traceback (most recent call last):
File "diff-test.py", line 213, in <module>
for line in git_proc.stdout:
File "/home/jgb/venvs/perceval/lib/python3.4/codecs.py", line 319, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe5 in position 579: invalid continuation byte
If you check those same commits with git log, you get:
$ git -C git.repo/ log --raw --numstat --pretty=fuller --decorate=full --parents -M -C -c \
--first-parent master --after 2005-09-01 --before 2005-09-31
commit 99977bd5fdeabbd0608a70e9411c243007ec4ea2 7eb93c89651c47c8095d476251f2e4314656b292 78938b0d8a95b09d94af214fdb6b5f053a5edb98 (tag: refs/tags/v0.99.6)
Merge: 7eb93c8 78938b0
Author: Junio C Hamano <[email protected]>
AuthorDate: Wed Sep 7 15:59:24 2005 -0700
Commit: Junio C Hamano <[email protected]>
CommitDate: Wed Sep 7 15:59:24 2005 -0700
GIT 0.99.6
1 1 Makefile
6 0 debian/changelog
::100644 100644 100644 9122c03... 033c96e... 6dbffc2... MM Makefile
commit 7eb93c89651c47c8095d476251f2e4314656b292 452ce291a99131768e2d61d2dcf8a4a1b78d39a3
Author: David_K<E5>gedal <[email protected]>
AuthorDate: Wed Sep 7 09:29:20 2005 +0200
Commit: Junio C Hamano <[email protected]>
CommitDate: Wed Sep 7 14:29:50 2005 -0700
The error seems to be rose by The string "David_Kgedal", which I suppose is not UTF-8 (hence the error banner I get). Therefore, I suspect of some trouble with Unicode encoding in the following lines:
git_proc = subprocess.Popen(git_cmd, stdout = subprocess.PIPE,
universal_newlines=True)
logging.info("git command: %s.", " ".join(git_cmd))
for line in git_proc.stdout:
print(line, end="", flush=True)
(Note that I've tried to simplify the code to cause the error without calling Perceval).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.