Skip to content

TypeError: __init__() got an unexpected keyword argument 'charset' #56

Open
@TheKruspe

Description

@TheKruspe

When installing flask-redis via pip, redis-py gets automatically installed as a dependency of flask-redis. However, the correct version of redis-py is not defined. This package (flask-redis==0.4.0) works fine with redis==3.5.3, but saving values via hmset throws an error using the newer version redis==4.0.2, which pip currently chooses to install.

File "/home/me/myProject/test.py", line 17, in saveToRedis
	flask_redis_client.hmset(myID, myDictionary)
  File ""/home/me/.venv/lib/python3.9/site-packages/redis/commands/core.py", line 3414, in hmset
	return self.execute_command('HMSET', name, *items)
  File "/home/me/.venv/lib/python3.9/site-packages/redis/client.py", line 1068, in execute_command
	conn = self.connection or pool.get_connection(command_name, **options)
  File "/home/me/.venv/lib/python3.9/site-packages/redis/connection.py", line 1168, in get_connection
	connection = self.make_connection()
  File "/home/me/.venv/lib/python3.9/site-packages/redis/connection.py", line 1208, in make_connection
	return self.connection_class(**self.connection_kwargs)
TypeError: __init__() got an unexpected keyword argument 'charset'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions