Cadasta / cadasta-qgis-plugin

[DEPRECATED] QGIS plugin to create, edit, upload and download Cadasta projects
GNU General Public License v3.0
4 stars 7 forks source link

500 when creating a project with select_multiple fields #227

Closed dpalomino closed 7 years ago

dpalomino commented 7 years ago

Steps to reproduce the error

  1. Open these shp files with QGIS: itc-f-cadaster-community-form.zip
  2. Create a new project in Cadasta importing the Polygon layer
  3. We get a 500 error

screen shot 2017-07-19 at 23 09 17

So it seems that the error appears due to the "crop" attribute, which is a select_multiple field.

Exception Type: KeyError at /api/v1/organizations/david-org/projects/import-testing-4/spatial/ Exception Value: 'crop' Request information: USER: dpalomino

dimasciput commented 7 years ago

@dpalomino strange, I can upload the crop attribute. Here's the result:

screen shot 2017-07-20 at 2 21 58 pm

dpalomino commented 7 years ago

Hi @dimasciput. Sorry for the delay, I'm traveling.

I can reproduce it, can you please check this video? https://screencast.com/t/5XlBzoNINm

I am using this project for testing: https://platform-staging.cadasta.org/organizations/david-org/projects/itc-f-cadaster-community-form/

As far as I see, there is nothing really special in those locations. I think it's failing because of the select_multiple field.

If you can let me know your username in staging I can grant you access to that project.

Also here the downloaded data from the project (you can use it for cloning the project): itc-f-cadaster-community-form.xlsx

dpalomino commented 7 years ago

@dimasciput, any update on this? Thanks!

oliverroick commented 7 years ago

I tried to reproduce this; it uploads as expected.

@dpalomino we need more detailed information on how you got to this error. Here's what I did:

  1. Join locations.csv to polygon.shp (I had to change the values of type in locations.csv to one of the standard types because the plugin doesn't support custom location types)
  2. Select Vector > Cadasta > Create Project
  3. In step 2, select locations_type for Location Type
  4. Upload
dimasciput commented 7 years ago

@dpalomino I also managed to upload the layer, maybe try the latest version?

dpalomino commented 7 years ago

@dimasciput @oliverroick

@dimasciput, sorry about the delay, I've been on holidays. I will be retesting this with the last version shortly. I will keep you posted.

SteadyCadence commented 7 years ago

I think this is related to #256. I am going to close this for the time being because we could not reproduce the issue. If it happens again we can re-open.