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

Unexpected token in json due to emojis #34

Closed
Edsardio opened this issue Feb 28, 2017 · 4 comments
Closed

Unexpected token in json due to emojis #34

Edsardio opened this issue Feb 28, 2017 · 4 comments

Comments

@Edsardio
Copy link

SyntaxError: Unexpected token ♂ in JSON at position 2062

It seems to crash sometimes due to symbols/emoji's etc.

@fojas
Copy link
Owner

fojas commented Feb 28, 2017

What version of the package are you using? It say in node_modules/cleverbot-node/package.json. Version 0.3.5 should work.

@Edsardio
Copy link
Author

Using version 3.5 that's why I was surprised

@fojas
Copy link
Owner

fojas commented Feb 28, 2017

I just ran the code in examples/sample.js and replaced the initial test message with ♂🎅🏾 and it worked. Are you able to capture what the request or JSON response is from the API?

@Edsardio
Copy link
Author

Hmm weird, after having it talk to itself for aprox 5 minutes it's not crashing anymore... Exact same code as when I created this issue...

@fojas fojas closed this as completed Mar 1, 2017
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