TrelloToYouTrack icon indicating copy to clipboard operation
TrelloToYouTrack copied to clipboard

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

Open aamnakhan opened this issue 8 years ago • 5 comments

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 avatar Feb 22 '17 08:02 aamnakhan

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

yousefhamza avatar Apr 23 '17 11:04 yousefhamza

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 avatar Nov 23 '17 17:11 rbarcante

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 avatar Nov 23 '17 18:11 rbarcante

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 avatar Nov 23 '17 19:11 rbarcante

@aamnakhan check this out

rbarcante avatar Nov 24 '17 00:11 rbarcante