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

Decoding issue with email #46

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

Decoding issue with email #46

GoogleCodeExporter opened this issue Aug 23, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Have a commit in the history with a email set to "DOMAIN\\USER"

Note: This happens for example when converting a project from TFVC to GIT

What is the expected output? What do you see instead?
Error is thrown trying to access dictionary, due to key being "DOMAIN\USER"

What version of the product are you using? What version of Python? On what
operating system?
Latest version, python 2.7, Windows




Original issue reported on code.google.com by Jon.Warg...@gmail.com on 17 Nov 2014 at 9:21

@GoogleCodeExporter
Copy link
Author

The easiest way to fix this would be

changes.py, line 173    
    def get_latest_author_by_email(self, name):
        name = name.decode("unicode_escape", "ignore")
        return self.authors_by_email[name]

Original comment by Jon.Warg...@gmail.com on 17 Nov 2014 at 9:32

@GoogleCodeExporter
Copy link
Author

Here is a patch for solution mentioned above

Original comment by Jon.Warg...@gmail.com on 17 Nov 2014 at 9:58

Attachments:

@GoogleCodeExporter
Copy link
Author

Hi Jon, I'm new to gitinspector. Would the above issue explain the following 
error output? "Exception in thread Thread-52:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/dist-packages/gitinspector/blame.py", line 73, in run
    author = self.changes.get_latest_author_by_email(email)
  File "/usr/lib/python2.7/dist-packages/gitinspector/changes.py", line 174, in get_latest_author_by_email
    return self.authors_by_email[name]
KeyError: u'nicolas@apache.org'

^CTraceback (most recent call last):
  File "/usr/bin/gitinspector", line 9, in <module>
    load_entry_point('gitinspector==0.3.2', 'console_scripts', 'gitinspector')()
  File "/usr/lib/python2.7/dist-packages/gitinspector/gitinspector.py", line 194, in main
    __run__.output()
  File "/usr/lib/python2.7/dist-packages/gitinspector/gitinspector.py", line 91, in output
    outputable.output(blame.BlameOutput(self.hard))
  File "/usr/lib/python2.7/dist-packages/gitinspector/blame.py", line 171, in __init__
    get(self.hard, self.changes)
  File "/usr/lib/python2.7/dist-packages/gitinspector/blame.py", line 157, in get
    __blame__ = Blame(hard, changes)
  File "/usr/lib/python2.7/dist-packages/gitinspector/blame.py", line 105, in __init__
    thread = BlameThread(changes, blame_string, FileDiff.get_extension(row), self.blames, row.strip())
  File "/usr/lib/python2.7/dist-packages/gitinspector/blame.py", line 50, in __init__
    __thread_lock__.acquire() # Lock controlling the number of threads running
  File "/usr/lib/python2.7/threading.py", line 323, in acquire
    self.__cond.wait()
  File "/usr/lib/python2.7/threading.py", line 243, in wait
    waiter.acquire()"

Original comment by anewemai...@gmail.com on 18 Nov 2014 at 8:33

@GoogleCodeExporter
Copy link
Author

Hi. Answering #4.

I think the last exception looks related to the fix recently implemented in 
revision 1d2fd619bdaf ?

Please check out the master branch and see if it still persists.

/Adam Waldenberg

Original comment by gitinspe...@ejwa.se on 19 Nov 2014 at 6:26

  • Changed state: NeedsFeedback

@GoogleCodeExporter
Copy link
Author

This issue was closed by revision 68a6e902284a.

Original comment by gitinspe...@ejwa.se on 19 Nov 2014 at 6:46

  • Changed state: Fixed

@adam-waldenberg adam-waldenberg added this to the 0.4.0 milestone Oct 9, 2015
adam-waldenberg added a commit that referenced this issue May 13, 2017
…).

This is only needed with emails that have escape characters, as described
in issue #46. If the call fails, it will most likely not affect us and
can be safely ignored.
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