jeffreykirchner / trade_steal

Web version of the Exchange and Specialization experiment. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=930078
GNU General Public License v3.0
0 stars 3 forks source link

incoming chat message, verify that chat text is not empty. #273

Open jeffreykirchner opened 5 days ago

jeffreykirchner commented 5 days ago

2024-11-26T18:04:30.0230877Z DETAIL: Failing row contains (69625, , Individual, 2024-11-26 18:04:29.711862+00, 2024-11-26 18:04:29.71188+00, 17370, 6432, Production, 4). 2024-11-26T18:04:30.0230973Z Traceback (most recent call last): 2024-11-26T18:04:30.0231048Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/django/db/backends/utils.py", line 89, in _execute 2024-11-26T18:04:30.0231190Z return self.cursor.execute(sql, params) 2024-11-26T18:04:30.0231276Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0231366Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/psycopg/cursor.py", line 723, in execute 2024-11-26T18:04:30.0231475Z raise ex.with_traceback(None) 2024-11-26T18:04:30.0231558Z psycopg.errors.CheckViolation: new row for relation "main_sessionplayerchat" violates check constraint "text_not_empty" 2024-11-26T18:04:30.0231679Z DETAIL: Failing row contains (69625, , Individual, 2024-11-26 18:04:29.711862+00, 2024-11-26 18:04:29.71188+00, 17370, 6432, Production, 4). 2024-11-26T18:04:30.0231776Z 2024-11-26T18:04:30.0231846Z The above exception was the direct cause of the following exception: 2024-11-26T18:04:30.0231917Z 2024-11-26T18:04:30.0231977Z Traceback (most recent call last): 2024-11-26T18:04:30.0232043Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/channels/routing.py", line 62, in call 2024-11-26T18:04:30.0232128Z return await application(scope, receive, send) 2024-11-26T18:04:30.0232187Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0232249Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/channels/security/websocket.py", line 37, in call 2024-11-26T18:04:30.0232348Z return await self.application(scope, receive, send) 2024-11-26T18:04:30.0232422Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0232498Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/channels/sessions.py", line 47, in call 2024-11-26T18:04:30.0232621Z return await self.inner(dict(scope, cookies=cookies), receive, send) 2024-11-26T18:04:30.0232713Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0232795Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/channels/sessions.py", line 263, in call 2024-11-26T18:04:30.0232911Z return await self.inner(wrapper.scope, receive, wrapper.send) 2024-11-26T18:04:30.0232995Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0233075Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/channels/auth.py", line 185, in call 2024-11-26T18:04:30.0233199Z return await super().call(scope, receive, send) 2024-11-26T18:04:30.0233280Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0233379Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/channels/middleware.py", line 24, in call 2024-11-26T18:04:30.0233474Z return await self.inner(scope, receive, send) 2024-11-26T18:04:30.0233562Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0233670Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/channels/routing.py", line 132, in call 2024-11-26T18:04:30.0233761Z return await application( 2024-11-26T18:04:30.0233840Z ^^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0233943Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/channels/consumer.py", line 94, in app 2024-11-26T18:04:30.0234032Z return await consumer(scope, receive, send) 2024-11-26T18:04:30.0234097Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0234196Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/channels/consumer.py", line 58, in call 2024-11-26T18:04:30.0234285Z await await_many_dispatch( 2024-11-26T18:04:30.0234414Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/channels/utils.py", line 50, in await_many_dispatch 2024-11-26T18:04:30.0234540Z await dispatch(result) 2024-11-26T18:04:30.0234632Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/channels/consumer.py", line 73, in dispatch 2024-11-26T18:04:30.0234742Z await handler(message) 2024-11-26T18:04:30.0234827Z File "/tmp/8dd0e3963c896b4/main/consumers/staff_session_consumer_mixins/subject_updates.py", line 120, in chat 2024-11-26T18:04:30.0234923Z await session_player_chat.asave() 2024-11-26T18:04:30.0235028Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/django/db/models/base.py", line 826, in asave 2024-11-26T18:04:30.0235121Z return await sync_to_async(self.save)( 2024-11-26T18:04:30.0235205Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0235307Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/asgiref/sync.py", line 448, in call 2024-11-26T18:04:30.0235404Z ret = await asyncio.wait_for(future, timeout=None) 2024-11-26T18:04:30.0235490Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0235591Z File "/opt/python/3.12.2/lib/python3.12/asyncio/tasks.py", line 520, in wait_for 2024-11-26T18:04:30.0235679Z return await fut 2024-11-26T18:04:30.0235758Z ^^^^^^^^^ 2024-11-26T18:04:30.0235854Z File "/opt/python/3.12.2/lib/python3.12/concurrent/futures/thread.py", line 58, in run 2024-11-26T18:04:30.0235947Z result = self.fn(*self.args, self.kwargs) 2024-11-26T18:04:30.0236025Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0236444Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/asgiref/sync.py", line 490, in thread_handler 2024-11-26T18:04:30.0236559Z return func(*args, *kwargs) 2024-11-26T18:04:30.0236661Z ^^^^^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0236745Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/django/db/models/base.py", line 814, in save 2024-11-26T18:04:30.0236839Z self.save_base( 2024-11-26T18:04:30.0236942Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/django/db/models/base.py", line 877, in save_base 2024-11-26T18:04:30.0237040Z updated = self._save_table( 2024-11-26T18:04:30.0237117Z ^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0237221Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/django/db/models/base.py", line 1020, in _save_table 2024-11-26T18:04:30.0237316Z results = self._do_insert( 2024-11-26T18:04:30.0237393Z ^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0237497Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/django/db/models/base.py", line 1061, in _do_insert 2024-11-26T18:04:30.0237597Z return manager._insert( 2024-11-26T18:04:30.0237675Z ^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0237776Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method 2024-11-26T18:04:30.0237876Z return getattr(self.get_queryset(), name)(args, kwargs) 2024-11-26T18:04:30.0237968Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0238049Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/django/db/models/query.py", line 1805, in _insert 2024-11-26T18:04:30.0238282Z return query.get_compiler(using=using).execute_sql(returning_fields) 2024-11-26T18:04:30.0238404Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0238491Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 1822, in execute_sql 2024-11-26T18:04:30.0238592Z cursor.execute(sql, params) 2024-11-26T18:04:30.0238693Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/django/db/backends/utils.py", line 67, in execute 2024-11-26T18:04:30.0238786Z return self._execute_with_wrappers( 2024-11-26T18:04:30.0238866Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0238967Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers 2024-11-26T18:04:30.0239063Z return executor(sql, params, many, context) 2024-11-26T18:04:30.0239160Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0239250Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/django/db/backends/utils.py", line 84, in _execute 2024-11-26T18:04:30.0239343Z with self.db.wrap_database_errors: 2024-11-26T18:04:30.0239447Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/django/db/utils.py", line 91, in exit 2024-11-26T18:04:30.0239540Z raise dj_exc_value.with_traceback(traceback) from exc_value 2024-11-26T18:04:30.0239621Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/django/db/backends/utils.py", line 89, in _execute 2024-11-26T18:04:30.0239734Z return self.cursor.execute(sql, params) 2024-11-26T18:04:30.0239817Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-11-26T18:04:30.0239898Z File "/tmp/8dd0e3963c896b4/antenv/lib/python3.12/site-packages/psycopg/cursor.py", line 723, in execute 2024-11-26T18:04:30.0240008Z raise ex.with_traceback(None) 2024-11-26T18:04:30.0240090Z django.db.utils.IntegrityError: new row for relation "main_sessionplayerchat" violates check constraint "text_not_empty"