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

Script gives error "UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c'" #5

Open
aamnakhan opened this issue Feb 22, 2017 · 5 comments

Comments

@aamnakhan
Copy link

Fixed using top answer here - http://stackoverflow.com/questions/31137552/unicodeencodeerror-ascii-codec-cant-encode-character-at-special-name

But the cards still haven't been imported even though the script ran successfully.
screen shot 2017-02-22 at 1 41 37 pm

@aamnakhan aamnakhan changed the title Gives error "UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c'" Script gives error "UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c'" Feb 22, 2017
@yousefhamza
Copy link
Owner

Can you provide more issues or make a PR with that change?
Thanks in advance 👍

@rbarcante
Copy link

Hi, I'm having the same issue.

I managed to manually import the issues generated with curl after printing the xml_string variable from Tty/YouTrack.py

But directly from the script it keeps returning "<Response [400]>".

Trying to solve this because it is a preety neat script.
If I'm able to resolve I'll open a PR.

@rbarcante
Copy link

I'm having the response:

ParseError at [row,col]:[202,101] Message: XML document structures must start and end within the same entity.

From youtrack through the api but can't find what is wrong since I can use the same output on curl and works fine, lol

@rbarcante
Copy link

I might have solved it.

Tested with other boards that where working and tweeking I found that latin characteres like: á , ê ... where returning the error, changed from xml_string.decode('utf-8') to xml_string.encode('utf-8') and it seems to have solved it.

Gonna test everything, clean my code and submit a PR ASAP.

@rbarcante
Copy link

@aamnakhan check this out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants