{"action":"opened","issue":{"url":"https://api.github.com/repos/california-civic-data-coalition/django-calaccess-raw-data/issues/1496","repository_url":"https://api.github.com/repos/california-civic-data-coalition/django-calaccess-raw-data","labels_url":"https://api.github.com/repos/california-civic-data-coalition/django-calaccess-raw-data/issues/1496/labels{/name}","comments_url":"https://api.github.com/repos/california-civic-data-coalition/django-calaccess-raw-data/issues/1496/comments","events_url":"https://api.github.com/repos/california-civic-data-coalition/django-calaccess-raw-data/issues/1496/events","html_url":"https://github.com/california-civic-data-coalition/django-calaccess-raw-data/issues/1496","id":196235425,"number":1496,"title":"django.db.utils.DataError on load of Cvr2SoCd","user":{"login":"charlex","id":1542740,"avatar_url":"https://avatars.githubusercontent.com/u/1542740?v=3","gravatar_id":"","url":"https://api.github.com/users/charlex","html_url":"https://github.com/charlex","followers_url":"https://api.github.com/users/charlex/followers","following_url":"https://api.github.com/users/charlex/following{/other_user}","gists_url":"https://api.github.com/users/charlex/gists{/gist_id}","starred_url":"https://api.github.com/users/charlex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charlex/subscriptions","organizations_url":"https://api.github.com/users/charlex/orgs","repos_url":"https://api.github.com/users/charlex/repos","events_url":"https://api.github.com/users/charlex/events{/privacy}","received_events_url":"https://api.github.com/users/charlex/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-17T18:22:27Z","updated_at":"2016-12-17T18:22:27Z","closed_at":null,"body":"During a run of `downloadcalaccessrawdata` in the load step, I encountered this database error. Did I muck something up on my database setup or is it on the calaccess side?\r\n\r\n```bash\r\nLoading data files\r\n Loading CvrSoCd\r\n Loading Cvr2SoCd\r\nTraceback (most recent call last):\r\n  File \"manage.py\", line 22, in <module>\r\n    execute_from_command_line(sys.argv)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/core/management/__init__.py\", line 385, in execute_from_command_line\r\n    utility.execute()\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/core/management/__init__.py\", line 377, in execute\r\n    self.fetch_command(subcommand).run_from_argv(self.argv)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/core/management/base.py\", line 288, in run_from_argv\r\n    self.execute(*args, **options.__dict__)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/core/management/base.py\", line 338, in execute\r\n    output = self.handle(*args, **options)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/calaccess_raw/management/commands/downloadcalaccessrawdata.py\", line 121, in handle\r\n    self.load()\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/calaccess_raw/management/commands/downloadcalaccessrawdata.py\", line 251, in load\r\n    call_command(\"loadcalaccessrawfile\", model.__name__)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/core/management/__init__.py\", line 115, in call_command\r\n    return klass.execute(*args, **defaults)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/core/management/base.py\", line 338, in execute\r\n    output = self.handle(*args, **options)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/core/management/base.py\", line 503, in handle\r\n    label_output = self.handle_label(label, **options)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/calaccess_raw/management/commands/loadcalaccessrawfile.py\", line 22, in handle_label\r\n    self.load(label)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/calaccess_raw/management/commands/loadcalaccessrawfile.py\", line 41, in load\r\n    self.load_postgresql(model, csv_path)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/calaccess_raw/management/commands/loadcalaccessrawfile.py\", line 160, in load_postgresql\r\n    self.cursor.execute(temp_insert)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/db/backends/utils.py\", line 81, in execute\r\n    return super(CursorDebugWrapper, self).execute(sql, params)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/db/backends/utils.py\", line 65, in execute\r\n    return self.cursor.execute(sql, params)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/db/utils.py\", line 94, in __exit__\r\n    six.reraise(dj_exc_type, dj_exc_value, traceback)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/db/backends/utils.py\", line 63, in execute\r\n    return self.cursor.execute(sql)\r\ndjango.db.utils.DataError: value too long for type character varying(19)\r\nCONTEXT:  COPY temporary_table, line 37468, column TRAN_ID: \"9A0E4A6D-5C20-49AE-B\"\r\n```\r\n\r\nI reproduced by calling `loadcalaccessrawfile` directly:\r\n\r\n```bash\r\n10:11:21 $ python manage.py loadcalaccessrawfile Cvr2SoCd\r\n Loading Cvr2SoCd\r\nTraceback (most recent call last):\r\n  File \"manage.py\", line 22, in <module>\r\n    execute_from_command_line(sys.argv)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/core/management/__init__.py\", line 385, in execute_from_command_line\r\n    utility.execute()\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/core/management/__init__.py\", line 377, in execute\r\n    self.fetch_command(subcommand).run_from_argv(self.argv)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/core/management/base.py\", line 288, in run_from_argv\r\n    self.execute(*args, **options.__dict__)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/core/management/base.py\", line 338, in execute\r\n    output = self.handle(*args, **options)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/core/management/base.py\", line 503, in handle\r\n    label_output = self.handle_label(label, **options)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/calaccess_raw/management/commands/loadcalaccessrawfile.py\", line 22, in handle_label\r\n    self.load(label)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/calaccess_raw/management/commands/loadcalaccessrawfile.py\", line 41, in load\r\n    self.load_postgresql(model, csv_path)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/calaccess_raw/management/commands/loadcalaccessrawfile.py\", line 160, in load_postgresql\r\n    self.cursor.execute(temp_insert)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/db/backends/utils.py\", line 81, in execute\r\n    return super(CursorDebugWrapper, self).execute(sql, params)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/db/backends/utils.py\", line 65, in execute\r\n    return self.cursor.execute(sql, params)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/db/utils.py\", line 94, in __exit__\r\n    six.reraise(dj_exc_type, dj_exc_value, traceback)\r\n  File \"/Users/cbodkin/.virtualenvs/hcbodkin.com/lib/python2.7/site-packages/django/db/backends/utils.py\", line 63, in execute\r\n    return self.cursor.execute(sql)\r\ndjango.db.utils.DataError: value too long for type character varying(19)\r\nCONTEXT:  COPY temporary_table, line 37468, column TRAN_ID: \"9A0E4A6D-5C20-49AE-B\"\r\n```"}}
{"actor":{"display_login":"charlex"}}