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

Warning: Incorrect string value: '\xCA\xBCs al...' for column 'name' at row 1 #62

Open
jaiswalankit opened this issue Aug 13, 2014 · 9 comments

Comments

@jaiswalankit
Copy link

This is the complete stack trace of the issue, generating while running "python manage.py cities_light" command:

/usr/local/lib/python2.7/dist-packages/autoslug/utils.py:30: RuntimeWarning: Argument <type 'str'> is not an unicode object. Passing an encoded string will likely have unexpected results.
return django_slugify(unidecode(value))

RAM used: 31420 kB Time: 0:00:00 Done: 100%|###################################|
Warning: Incorrect string value: '\xCA\xBCs al...' for column 'name' at row 1

@jpic
Copy link
Member

jpic commented Aug 18, 2014

What OS ?

Is there any way I can reproduce this ?

Could you reproduce it in a virtualenv ? I see that you probably ran sudo pip install which is not a good idea because it would install packages globally and potentially mess with python dependencies for system-installed tools.

@ankitjaiswal07
Copy link

It's Ubuntu 12.04. You can reproduce is by importing the data into the tables. I can see some characters in the name field of City API which might be causing the char set issue.

@mauricioabreu
Copy link

Which database are you using? I suspect it is a problem related to encoding using MySQL.

@jpic
Copy link
Member

jpic commented Dec 29, 2014

Did you try with python 3 ?

@jaiswalankit
Copy link
Author

No, it was python 2.7.5 and yes, I was using MYSQL database.

On Mon, Dec 29, 2014 at 3:41 PM, James Pic notifications@github.com wrote:

Did you try with python 3 ?


Reply to this email directly or view it on GitHub
#62 (comment)
.

@jpic
Copy link
Member

jpic commented Jan 28, 2015

Might be fixed by #77

@lluiscanals
Copy link

Which CHARACTER SET and COLLATE is your mysql database?

@kodeine
Copy link

kodeine commented Aug 19, 2016

change your database and its tables to support ut8, it will fix the issue.

@Garfius
Copy link

Garfius commented Feb 14, 2020

change your database and its tables to support ut8, it will fix the issue.

YES, 4 example:

CREATE DATABASE weblate CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

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

7 participants