django-gsheets icon indicating copy to clipboard operation
django-gsheets copied to clipboard

python manage.py syncgsheets ValueError: 'Django GUID' is not in list

Open gookenhaim opened this issue 4 years ago • 2 comments

Hi. I am using ngrok and testing it in dev mode and when syncgsheet I ran across this problem:

ValueError: 'Django GUID' is not in list

self.upsert_sheet_data(**push_data) existing_row_ix = self.existing_row(**data) sheet_id_ix = self.column_index(self.sheet_id_field)

return self.sheet_headers.index(field_name)

ValueError: 'Django GUID' is not in list

gookenhaim avatar Sep 11 '21 22:09 gookenhaim

Same stuck

model.push_to_sheet() File "venv38\lib\site-packages\gsheets\mixins.py", line 40, in push_to_sheet return interface.upsert_table() File "\venv38\lib\site-packages\gsheets\gsheets.py", line 240, in upsert_table self.upsert_sheet_data(**push_data) File "\venv38\lib\site-packages\gsheets\gsheets.py", line 273, in upsert_sheet_data existing_row_ix = self.existing_row(**data) File "\venv38\lib\site-packages\gsheets\gsheets.py", line 158, in existing_row sheet_id_ix = self.column_index(self.sheet_id_field) File "\venv38\lib\site-packages\gsheets\gsheets.py", line 147, in column_index return self.sheet_headers.index(field_name) ValueError: 'Django GUID' is not in list

Model : -

class A(mixins.SheetPushableMixin, models.Model): spreadsheet_id = 'some_id'

NishantGhanate avatar Mar 03 '22 16:03 NishantGhanate

Fixed just add Django GUID in g-sheets header if you want overwrite this name then use sheet_id_field

NishantGhanate avatar Mar 06 '22 06:03 NishantGhanate