Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update README.rst#388

Open
kofnet002 wants to merge 1 commit into
django:mainfrom
kofnet002:patch-1
Open

Update README.rst#388
kofnet002 wants to merge 1 commit into
django:mainfrom
kofnet002:patch-1

Conversation

@kofnet002

Copy link
Copy Markdown

I followed the tutorial and it was great, but I had the error below
TypeError: RedisChannelLayer.__init__() got an unexpected keyword argument 'ssl_cert_reqs'.

because the CHANNELS_LAYER CONFIG was like this
"BACKEND": "channels_redis.core.RedisChannelLayer"

I had to uninstall the channels redis, channels-redis, and install channels_redis for it to work. And use your configuration as below:

"default": {
    "BACKEND": "channels_redis.pubsub.RedisPubSubChannelLayer",
    "CONFIG": {
        "hosts":[{
            "address": "rediss://:your_redis_url",  # "REDIS_TLS_URL"
            "ssl_cert_reqs": None,
        }]
    }
}
}

I followed the tutorial and it was great, but I had the error below
 ```TypeError: RedisChannelLayer.__init__() got an unexpected keyword argument 'ssl_cert_reqs'```.

because the CHANNELS_LAYER CONFIG was like this
```"BACKEND": "channels_redis.core.RedisChannelLayer"```

I had to uninstall the channels redis, ``channels-redis``, and install  ``channels_redis`` for it work. And use your configuration as below:

```CHANNEL_LAYERS = {
   "default": {
    "BACKEND": "channels_redis.pubsub.RedisPubSubChannelLayer",
    "CONFIG": {
        "hosts":[{
            "address": "rediss://:your_redis_url",  # "REDIS_TLS_URL"
            "ssl_cert_reqs": None,
        }]
    }
}
}```

@carltongibson carltongibson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the same package.

https://pypi.org/project/channels-redis/

Here's the PEP:

The name should be lowercased with all runs of the characters ., -, or _ replaced with a single - character.

https://peps.python.org/pep-0503/#normalized-names

@kofnet002

kofnet002 commented May 3, 2024 via email

Copy link
Copy Markdown
Author

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

Successfully merging this pull request may close these issues.

2 participants