Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Import issue error with Unicode characters in title #17

Open
provegard opened this issue Nov 1, 2013 · 6 comments
Open

Import issue error with Unicode characters in title #17

provegard opened this issue Nov 1, 2013 · 6 comments

Comments

@provegard
Copy link

I had an issue with a typographic quote in the title, got:

Traceback (most recent call last):
  File "gh-issues-import.py", line 387, in <module>
    import_issues(issues)
  File "gh-issues-import.py", line 356, in import_issues
    print("Successfully created issue '%s'" % result_issue['title'])
  File "c:\python33\lib\encodings\cp850.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u201d' in position 44: character maps to <undefined>
@IQAndreas
Copy link
Owner

Looks like some of Python's functions don't like Unicode characters that much (which is something I really should have tested, being Swedish myself).

Sorry for the delay, I will get on this ASAP!

@IQAndreas
Copy link
Owner

I have been testing around, and it seems to handle unicode characters (and even unescaped backslashes) seem to import just fine on my system (Ubuntu 13.10), so I worry it may be an "operating-system specific" problem.

What operating system are you using, and do you have a link to the issue you tried to import?

@provegard
Copy link
Author

I'm using Windows. The issue is in a private repo, but I will try to replicate the issue with two public repos.

@IQAndreas
Copy link
Owner

The issue is in a private repo, but I will try to replicate the issue with two public repos.

You are welcome to use the following issue:

And then write to the following repo:

With the following command:

$ python3 gh-issues-import.py --source IQAndreas/github-issues-import --target IQAndreas-testprojects/github-issues-import-example --issues 19 --no-config

I haven't tested, but I don't believe you need write-permissions on the target repo in order to open issues there (even with an automated script).

@IQAndreas
Copy link
Owner

I am closing this issue for now since it seems to be resolved, but if you are still having problems with it, please leave a comment, and I will re-open this issue.

@vincenttran18
Copy link

I'm still having the same issue importing issues between two private repos. The repo being imported into is a fork from the repo being imported from. The issues being imported occasionally contain CJK characters.

Are you sure you wish to continue? [Y/n] Y
Traceback (most recent call last):
  File "C:\github-issues-import-master\gh-issues-import.py", line 445, in <module>
    import_issues(issues)
  File "C:\github-issues-import-master\gh-issues-import.py", line 407, in import_issues
    print("Successfully created issue '%s'" % result_issue['title'])
  File "C:\Python34\lib\encodings\cp437.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u201c' in position
87: character maps to <undefined>

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants