-
Notifications
You must be signed in to change notification settings - Fork 30
Unicode error #55
Comments
For supplementary info (supplemental info?) here is the traceback I got locally against Exchange.
|
Our line of interest is probably Django hints This substring is in
To be specific, the traceback says While it isn't a correct or robust way for us to handle byte blobs we receive,
That's a little funny, because Wikipedia gives the following list of languages as likely to use this character set:
Why can't we just use Can we just delete the wrong characters? Well, what if there are none which aren't wrong - then do we give the field a default name? In any case, this means destroying input data. But it does seem safer to replace the whole string than to unpredictably try to salvage something from what may be totally corrupted nonsense. The right solution would be, if the gpkg provides a clue about what encoding field names will be in, and we get GDAL to use that clue, or at worst give that clue to us so we can fix things. If on the other hand gpkg is being abused by certain files we can find in the wild, we can feel more justified in "losing data" because the data was already lost due to someone else's mistake. If we really have no options, then the best thing to do would be to treat field names only as bytestrings and never as characters (because the moment they are treated as characters, this encoding issue will arise again). To sum up, in order of preference
|
We could also just explicitly and verbosely barf on the whole file and reject it for the user to worry about, that's another option. |
This is looking like a gpkg creation error rather than encoding confusion. I vote for rejecting the file with some actionable details for the user. |
In this conversation about rejected uploads I'd like to chime in and share
some of my experiences after talking to GeoNode users.
In Indonesia, after trying to upload a 500mb raster file for days and
getting timeouts a user told me the file was finally uploaded and then
rejected because it did not come with a valid projection file.
That led me to think that in many cases the user is not able to resolve the
problems themselves and will need to ask for help from the system
administrator, in those cases we can help them by doing the following:
1. Having a basic workflow in which users upload spatial files and we let
it through but do not have it active yet.
2. The end user can share that partial upload with other users or admins
until they figure out a way to enable the layer (without a reupload when
possible)
3. after all conflicts have been fixed it becomes active like a regular
layer.
I am always a fan of always enabling layers that are fully functional (can
automatically be turned into a slippy map), but GeoNode users seem to want
GeoNode to also help them with the non individual curation aspect.
Is there a way to reject files without requiring a re-upload at a later
time?
…On Thu, Dec 1, 2016 at 8:57 PM, Jivan Amara ***@***.***> wrote:
This is looking like a gpkg creation error rather than encoding confusion.
I vote for rejecting the file with some actionable details for the user.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADW15y6FQyLk5jFQiOEqGj4dY7aTgwLks5rD3sngaJpZM4Kmckl>
.
|
In django-osgeo-importer, visit /uploads/new and click Choose File. Select the file linked below. It should continue to the next step of the upload process but halts with a UnicodeDecodeError.
https://eventkit.s3.amazonaws.com/0e473d86-6953-47d0-8dda-721b94039e1d/osm-vector/portauprince.gpkg
The text was updated successfully, but these errors were encountered: