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

Low-level serializer. UTF8. #50

Open
donkisean opened this issue Jan 28, 2015 · 4 comments
Open

Low-level serializer. UTF8. #50

donkisean opened this issue Jan 28, 2015 · 4 comments

Comments

@donkisean
Copy link

When, i use Low-level serializer, get this mistake:
'utf8' codec can't decode byte 0xa6 in position 14: invalid start byte. You passed in '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00_\xa6R@\x91\xbc:IoE@' (<type 'str'="">)

@leplatrem
Copy link
Collaborator

Could you please provide the full stacktrace please ?

@donkisean
Copy link
Author

I use only this code:
GeoJSONSerializer().serialize(Restaurants.objects.all(), use_natural_keys=True, with_modelname=False)

DjangoUnicodeDecodeError in http://dpaste.com/1NFBKPS
indicates to serializers.py:
in serialize ...elif isinstance(queryset, QuerySet): self.serialize_queryset(queryset) ...370
in serialize_queryset ...self.handle_field(obj, self.geometry_field) ...311
in handle_field ...if isinstance(obj, Model): value = getattr(obj, field_name) ...207

DB: utf8_general_ci, MyISAM
Language: russian
all filies have: # -- coding: utf-8 --

@donkisean
Copy link
Author

Was one step, this wonderful application, in my project.
Anybody?

@leplatrem
Copy link
Collaborator

I'm sorry I can't spend some time right now. The paste seems to have been purged...

Can you try to accomplish the same operations using the default Django Serializers (JSON for ex) ? ...just to make sure the problem comes from this package, and not from your database setup or content...

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