Hey there!I recently updated to Web2py Version 2.24.1-stable+timestamp.2023.03.23.05.07.17It uses python 3.9.14, running in production serving around 60 requests per second, using resources efficiently and running really smoothly :DSince the update, I'm seeing this error sporadically: redis.exceptions.DataError: Invalid input of type: 'NoneType'. Convert to a bytes, string, int or float first.This is the traceback:Traceback (most recent call last):
File "applications/eldia/compiled/models.db.py", line 113, in <module>
File "/var/www/medios/gluon/globals.py", line 979, in connect
row = table(record_id, unique_key=unique_key)
File "/opt/virtualenvs/medios_py39/lib/python3.9/site-packages/redis/connection.py", line 318, in read_response
raw = self._buffer.readline()
File "/opt/virtualenvs/medios_py39/lib/python3.9/site-packages/redis/connection.py", line 249, in readline
self._read_from_socket()
File "/opt/virtualenvs/medios_py39/lib/python3.9/site-packages/redis/connection.py", line 195, in _read_from_socket
raise ConnectionError(SERVER_CLOSED_CONNECTION_ERROR)
redis.exceptions.ConnectionError: Connection closed by server.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/www/medios/gluon/main.py", line 439, in wsgibase
serve_controller(request, response, session)
File "/var/www/medios/gluon/main.py", line 173, in serve_controller
run_models_in(environment)
File "/var/www/medios/gluon/compileapp.py", line 563, in run_models_in
restricted(ccode, environment, layer=model)
File "/var/www/medios/gluon/restricted.py", line 219, in restricted
exec(ccode, environment)
File "applications/eldia/compiled/models.db.py", line 116, in <module>
File "applications/eldia/compiled/models.db.py", line 47, in raise_error
gluon.http.HTTP: 500 INTERNAL SERVER ERROR
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/www/medios/gluon/main.py", line 455, in wsgibase
session._try_store_in_db(request, response)
File "/var/www/medios/gluon/globals.py", line 1254, in _try_store_in_db
record_id = table.insert(**dd)
File "/var/www/medios/gluon/contrib/redis_session.py", line 167, in insert
pipe.execute()
File "/opt/virtualenvs/medios_py39/lib/python3.9/site-packages/redis/client.py", line 2078, in execute
return conn.retry.call_with_retry(
File "/opt/virtualenvs/medios_py39/lib/python3.9/site-packages/redis/retry.py", line 46, in call_with_retry
return do()
File "/opt/virtualenvs/medios_py39/lib/python3.9/site-packages/redis/client.py", line 2079, in <lambda>
lambda: execute(conn, stack, raise_on_error),
File "/opt/virtualenvs/medios_py39/lib/python3.9/site-packages/redis/client.py", line 1922, in _execute_transaction
all_cmds = connection.pack_commands(
File "/opt/virtualenvs/medios_py39/lib/python3.9/site-packages/redis/connection.py", line 895, in pack_commands
for chunk in self.pack_command(*cmd):
File "/opt/virtualenvs/medios_py39/lib/python3.9/site-packages/redis/connection.py", line 858, in pack_command
for arg in map(self.encoder.encode, args):
File "/opt/virtualenvs/medios_py39/lib/python3.9/site-packages/redis/connection.py", line 108, in encode
raise DataError(
redis.exceptions.DataError: Invalid input of type: 'NoneType'. Convert to a bytes, string, int or float first.
It's not clear to me where or how the error happens. From what I see, I understand that the problem is with redis session, but I can't figure out where.
I run python 3.9.14 with virtualenv and Redis 4.3.5.Any point or suggestion will be much appreciated.Thanks!