I am going through the GeoDjango tutorial from the official documentation. 1. I have installed the required geospatial libraries, installed and enabled spatial functionality by extending the PostgreSQL via postgis. 2. Downloaded the world borders data, and have unzipped the data. 3. Created a GeoDjango model (WorldBorder) in the world app. 4. Created the load.py inside the world app, as instructed in the documentation.
But when I try to import the *load* module and call the *run* routine, I am getting an error: Failed to save the feature (id: 141) into the model with the keyword > arguments: > Traceback (most recent call last): > File > "/home/vagrant/.virtualenvs/testenv/lib/python3.6/site-packages/django/contrib/gis/utils/layermapping.py", > line 577, in _save > stream.write('%s: %s\n' % ('Updated' if is_update else 'Saved', m)) > UnicodeEncodeError: 'ascii' codec can't encode characters in position > 7-8: ordinal not in range(128) > During handling of the above exception, another exception occurred: > Traceback (most recent call last): > File "<console>", line 1, in <module> > File "/vagrant/geo_project/world/load.py", line 30, in run > lm.save(strict=True, verbose=verbose) > File > "/home/vagrant/.virtualenvs/testenv/lib/python3.6/site-packages/django/contrib/gis/utils/layermapping.py", > line 627, in save > _save() > File "/usr/lib/python3.6/contextlib.py", line 52, in inner > return func(*args, **kwds) > File > "/home/vagrant/.virtualenvs/testenv/lib/python3.6/site-packages/django/contrib/gis/utils/layermapping.py", > line 586, in _save > stream.write('%s\n' % kwargs) > UnicodeEncodeError: 'ascii' codec can't encode character '\xc3' in > position 62: ordinal not in range(128) I cannot figure out where I am wrong. Could you please help me out? Thank you. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAM4YLWJ0uCO47PWEaPAUYB4JCwpBMW-AVsoKA2u_ksmmUhXKEg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.