Hello,

I have an app which run well locally in the default otree way. However, 
when it is run with postgres as the database, no matter remotely (with 
heroku) or locally,  the app gives the following error before session is 
created:


Failed to create session: "value too long for type character varying(10000) 
"

Traceback (most recent call last):
  File "/app/.heroku/python/lib/python3.6/site-packages/otree/apps.py", line 
82, in execute
    return self.cursor.execute(sql, params)
psycopg2.DataError: value too long for type character varying(10000)


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File 
"/app/.heroku/python/lib/python3.6/site-packages/otree/channels/consumers.py", 
line 148, in create_session
    otree.session.create_session(**kwargs)
  File "/app/.heroku/python/lib/python3.6/site-packages/otree/session.py", line 
391, in create_session
    otree.db.idmap.save_objects()
  File "/app/.heroku/python/lib/python3.6/site-packages/otree/db/idmap.py", 
line 112, in save_objects
    instance.save()
  File 
"/app/.heroku/python/lib/python3.6/site-packages/otree_save_the_change/mixins.py",
 line 130, in save
    super(SaveTheChange, self).save(*args, **kwargs)
  File 
"/app/.heroku/python/lib/python3.6/site-packages/otree_save_the_change/mixins.py",
 line 105, in save
    super(BaseChangeTracker, self).save(*args, **kwargs)
  File "/app/.heroku/python/lib/python3.6/site-packages/idmap/models.py", line 
119, in save
    super(SharedMemoryModel, self).save(*args, **kwargs)
  File 
"/app/.heroku/python/lib/python3.6/site-packages/django/db/models/base.py", 
line 734, in save
    force_update=force_update, update_fields=update_fields)
  File 
"/app/.heroku/python/lib/python3.6/site-packages/django/db/models/base.py", 
line 762, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, 
update_fields)
  File 
"/app/.heroku/python/lib/python3.6/site-packages/django/db/models/base.py", 
line 827, in _save_table
    forced_update)
  File 
"/app/.heroku/python/lib/python3.6/site-packages/django/db/models/base.py", 
line 877, in _do_update
    return filtered._update(values) > 0
  File 
"/app/.heroku/python/lib/python3.6/site-packages/django/db/models/query.py", 
line 580, in _update
    return query.get_compiler(self.db).execute_sql(CURSOR)
  File 
"/app/.heroku/python/lib/python3.6/site-packages/django/db/models/sql/compiler.py",
 line 1062, in execute_sql
    cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
  File 
"/app/.heroku/python/lib/python3.6/site-packages/django/db/models/sql/compiler.py",
 line 840, in execute_sql
    cursor.execute(sql, params)
  File "/app/.heroku/python/lib/python3.6/site-packages/otree/apps.py", line 
99, in execute
    raise
  File "/app/.heroku/python/lib/python3.6/site-packages/django/db/utils.py", 
line 98, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/app/.heroku/python/lib/python3.6/site-packages/django/utils/six.py", 
line 685, in reraise
    raise value.with_traceback(tb)
  File "/app/.heroku/python/lib/python3.6/site-packages/otree/apps.py", line 
82, in execute
    return self.cursor.execute(sql, params)
django.db.utils.DataError: value too long for type character varying(10000)


Does anyone know the reason for this? And the way to solve it?


Thank you in advance.


Best regards,

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to