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

Encoding issues #15

Closed
theuguest opened this issue Sep 26, 2021 · 3 comments
Closed

Encoding issues #15

theuguest opened this issue Sep 26, 2021 · 3 comments

Comments

@theuguest
Copy link

Hi! I'm using download.get_responses and the connection to remote-control web if working perfectly, but for some sid's I have the error 'charmap' codec can't encode character '\U0001f449' in position 1064935: character maps to <undefined>
I tried to redefine the encoding using sys.getdefaultencoding(), 'replace but I'm thinking how can I add this line to the reading process before I could do the path.write_text(csv)
This is happening with some of the surveys I had on my website, not all of them.
If you can help me with that or give me some ideas, I'll appreciate it a lot. Thank you.

@DIRKMJK
Copy link
Owner

DIRKMJK commented Sep 27, 2021

Hi Daniella, thanks for your feedback! My first thought was that the problem was caused by an emoji (👉), but I tested it and had no problem exporting an answer containing this emoji. Can you think of any other ways in which the surveys that resulted in problems are different from the ones you didn’t have problems with?

@theuguest
Copy link
Author

Thank you for your answer! I identified that my actual encoding didn't recognize the emojis, and I had problems reading the files. I did the same from another computer with another encoding treatment, and now I can run the code perfectly. It helped to know that was an emoji’s issue. For further surveys, I’m going to restrict that type of character just in case. Thanks again!

@DIRKMJK
Copy link
Owner

DIRKMJK commented Sep 28, 2021

Glad to hear to managed to fix it!

@DIRKMJK DIRKMJK closed this as completed Sep 28, 2021
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