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

UnicodeEncodeError in function __escape_extensible_value #24

Closed
benoitguigal opened this issue May 31, 2016 · 5 comments
Closed

UnicodeEncodeError in function __escape_extensible_value #24

benoitguigal opened this issue May 31, 2016 · 5 comments

Comments

@benoitguigal
Copy link
Contributor

benoitguigal commented May 31, 2016

To reproduce the bug, use a unicode string
event = GAEvent(category='category', action='action', label=u'éàè')
tracker.track_event(event, session, visitor)

Maybe we should replace ''.join(map(_translate, str(value))) by u''.join(map(_translate, value)).encode('utf-8')?

Maybe some explanations here:
http://stackoverflow.com/questions/9942594/unicodeencodeerror-ascii-codec-cant-encode-character-u-xa0-in-position-20

@kra3
Copy link
Owner

kra3 commented May 31, 2016

thanks for #25.
I'd like to add 'ignore' as second argument to the encode function though.
If no objection otherwise, I'll add that too.

@benoitguigal
Copy link
Contributor Author

sure

@kra3 kra3 closed this as completed May 31, 2016
@benoitguigal
Copy link
Contributor Author

Do you plan to publish a new release to pypi ?

@kra3
Copy link
Owner

kra3 commented May 31, 2016

I'll in a week, not before :)
On May 31, 2016 17:30, "Benoît Guigal" notifications@github.com wrote:

Do you plan to publish a new release to pypi ?


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
#24 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AAC-rKWFjua76wZpMo0LX40DeX4CjAjTks5qHCLHgaJpZM4IqTt8
.

@benoitguigal
Copy link
Contributor Author

ok thanks

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

2 participants