Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error loading SOA data -- field too short #168

Closed
aih opened this issue Feb 11, 2021 · 4 comments
Closed

Error loading SOA data -- field too short #168

aih opened this issue Feb 11, 2021 · 4 comments
Assignees

Comments

@aih
Copy link
Collaborator

aih commented Feb 11, 2021

On feature/SOA_Ayesha branch

Traceback (most recent call last):
  File "./manage.py", line 22, in <module>
    main()
  File "./manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/core/management/base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/core/management/base.py", line 371, in execute
    output = self.handle(*args, **options)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/core/management/commands/loaddata.py", line 72, in handle
    self.loaddata(fixture_labels)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/core/management/commands/loaddata.py", line 114, in loaddata
    self.load_label(fixture_label)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/core/management/commands/loaddata.py", line 181, in load_label
    obj.save(using=self.using)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/core/serializers/base.py", line 223, in save
    models.Model.save_base(self.object, using=using, raw=True, **kwargs)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/db/models/base.py", line 789, in save_base
    force_update, using, update_fields,
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/db/models/base.py", line 870, in _save_table
    forced_update)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/db/models/base.py", line 923, in _do_update
    return filtered._update(values) > 0
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/db/models/query.py", line 803, in _update
    return query.get_compiler(self.db).execute_sql(CURSOR)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1515, in execute_sql
    cursor = super().execute_sql(result_type)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1154, in execute_sql
    cursor.execute(sql, params)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/db/backends/utils.py", line 98, in execute
    return super().execute(sql, params)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/db/backends/utils.py", line 66, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
django.db.utils.DataError: Problem installing fixture '/Users/arihershowitz/Documents/workspace/FlatGovDir/FlatGov/server_py/flatgov/dumped_statements.json': Could not load bills.Statement(pk=177): value too long for type character varying(250)
@aih aih added the bug Something isn't working label Feb 11, 2021
@ayeshamk
Copy link
Collaborator

No errors on feature/SOA_Ayesha branch. The error occurs on a different code. Ari pushed it on feature/SOA_Ayesha_ah.

@ayeshamk
Copy link
Collaborator

ayeshamk commented Feb 12, 2021

Hi Ari,

The column is set as VARCHAR(250) which means you have set an explicit 250 character limit somewhere on the DB.

There are some solutions that you can try to fix this error here on Stack overflow: https://stackoverflow.com/questions/13485030/strange-postgresql-value-too-long-for-type-character-varying500

@aih
Copy link
Collaborator Author

aih commented Feb 12, 2021 via email

@ayeshamk ayeshamk removed the bug Something isn't working label Feb 12, 2021
@ayeshamk
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants