Comments (9)
I have fixed the issue using the following command
pip install --upgrade pyopenssl
Thanks
from daphne.
It's a problem with your SSL install - I can't help you specifically. I suggest trying to upgrade it, and since it looks like you're on Mac OS, maybe try using a version from brew
instead.
from daphne.
Can I get the full traceback please? The error itself doesn't give enough information.
from daphne.
I'm also getting this error on ubuntu 14.04 LTS, Python 2.7.6, pip 1.5.4 after running the following command.
daphne -b 0.0.0.0 -p 8001 app_name.asgi:channel_layer
Traceback (most recent call last):
File "/usr/local/bin/daphne", line 7, in <module>
from daphne.cli import CommandLineInterface
File "/usr/local/lib/python2.7/dist-packages/daphne/cli.py", line 5, in <module>
from .server import Server, build_endpoint_description_strings
File "/usr/local/lib/python2.7/dist-packages/daphne/server.py", line 4, in <module>
from twisted.internet import reactor, defer
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/reactor.py", line 38, in <module>
from twisted.internet import default
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/default.py", line 56, in <module>
install = _getInstallFunction(platform)
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/default.py", line 44, in _getInstallFunction
from twisted.internet.epollreactor import install
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/epollreactor.py", line 24, in <module>
from twisted.internet import posixbase
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 18, in <module>
from twisted.internet import error, udp, tcp
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 28, in <module>
from twisted.internet._newtls import (
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/_newtls.py", line 21, in <module>
from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
File "/usr/local/lib/python2.7/dist-packages/twisted/protocols/tls.py", line 63, in <module>
from twisted.internet._sslverify import _setAcceptableProtocols
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/_sslverify.py", line 38, in <module>
TLSVersion.TLSv1_1: SSL.OP_NO_TLSv1_1,
AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1'
from daphne.
It looks like the SSL package you have installed isn't new enough for Twisted. Run pip install -U Twisted[tls]
and it should bring in a new enough version.
from daphne.
I'm getting the following error when I'm trying to runserver with channels package :
It happened inside of local server and outside.
Can someone help me ?
Unhandled exception in thread started by <function wrapper at 0x103cb7758>
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(args, **kwargs)
File "/Library/Python/2.7/site-packages/django/core/management/commands/runserver.py", line 113, in inner_run
autoreload.raise_last_exception()
File "/Library/Python/2.7/site-packages/django/utils/autoreload.py", line 249, in raise_last_exception
six.reraise(_exception)
File "/Library/Python/2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "/Library/Python/2.7/site-packages/django/init.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Library/Python/2.7/site-packages/django/apps/registry.py", line 115, in populate
app_config.ready()
File "/Library/Python/2.7/site-packages/channels/apps.py", line 22, in ready
monkeypatch_django()
File "/Library/Python/2.7/site-packages/channels/hacks.py", line 10, in monkeypatch_django
from .management.commands.runserver import Command as RunserverCommand
File "/Library/Python/2.7/site-packages/channels/management/commands/runserver.py", line 5, in
from daphne.server import Server, build_endpoint_description_strings
File "/Library/Python/2.7/site-packages/daphne/server.py", line 4, in
from twisted.internet import reactor, defer
File "/Library/Python/2.7/site-packages/twisted/internet/reactor.py", line 38, in
from twisted.internet import default
File "/Library/Python/2.7/site-packages/twisted/internet/default.py", line 56, in
install = _getInstallFunction(platform)
File "/Library/Python/2.7/site-packages/twisted/internet/default.py", line 50, in _getInstallFunction
from twisted.internet.selectreactor import install
File "/Library/Python/2.7/site-packages/twisted/internet/selectreactor.py", line 18, in
from twisted.internet import posixbase
File "/Library/Python/2.7/site-packages/twisted/internet/posixbase.py", line 18, in
from twisted.internet import error, udp, tcp
File "/Library/Python/2.7/site-packages/twisted/internet/tcp.py", line 28, in
from twisted.internet._newtls import (
File "/Library/Python/2.7/site-packages/twisted/internet/_newtls.py", line 21, in
from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
File "/Library/Python/2.7/site-packages/twisted/protocols/tls.py", line 63, in
from twisted.internet._sslverify import _setAcceptableProtocols
File "/Library/Python/2.7/site-packages/twisted/internet/_sslverify.py", line 38, in
TLSVersion.TLSv1_1: SSL.OP_NO_TLSv1_1,
AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1'
from daphne.
I ran brew upgrade and now it's working!
Thank you
from daphne.
I am trying to use django channels on redhat and getting same error message. I tried to upgrade pyopenssl, twisted and yum upgrade also. I am still getting same error.
My environment:
python - 2.7.5
pip - 9.0.1
OpenSSL 17.3.0
Error:
File "/usr/lib/python2.7/site-packages/channels/management/commands/runserver.py", line 5, in
from daphne.server import Server, build_endpoint_description_strings
File "/usr/lib/python2.7/site-packages/daphne/server.py", line 8, in
from twisted.internet import reactor, defer
File "/usr/lib64/python2.7/site-packages/twisted/internet/reactor.py", line 38, in
from twisted.internet import default
File "/usr/lib64/python2.7/site-packages/twisted/internet/default.py", line 56, in
install = _getInstallFunction(platform)
File "/usr/lib64/python2.7/site-packages/twisted/internet/default.py", line 44, in _getInstallFunction
from twisted.internet.epollreactor import install
File "/usr/lib64/python2.7/site-packages/twisted/internet/epollreactor.py", line 24, in
from twisted.internet import posixbase
File "/usr/lib64/python2.7/site-packages/twisted/internet/posixbase.py", line 18, in
from twisted.internet import error, udp, tcp
File "/usr/lib64/python2.7/site-packages/twisted/internet/tcp.py", line 28, in
from twisted.internet._newtls import (
File "/usr/lib64/python2.7/site-packages/twisted/internet/_newtls.py", line 21, in
from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
File "/usr/lib64/python2.7/site-packages/twisted/protocols/tls.py", line 63, in
from twisted.internet._sslverify import _setAcceptableProtocols
File "/usr/lib64/python2.7/site-packages/twisted/internet/_sslverify.py", line 38, in
TLSVersion.TLSv1_1: SSL.OP_NO_TLSv1_1,
AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1'
from daphne.
Hi. Check your twisted installation. I suspect you've missed some python package to install.
from daphne.
Related Issues (20)
- how to set websocket send buffersize in daphne
- issuse when i using daphe in my django app with streaminghttpresponse HOT 7
- Can daphne run WSGI apps? HOT 6
- Does daphne have a file for initialization?
- Requests with Transfer-Encoding: chunked have no content HOT 14
- StreamHttpResponse with sync operations break in Daphne HOT 5
- Memory usage: Daphne loading all the file in memory (POST request) HOT 7
- Text streaming buffered issue
- Implement WebSocket Denial Response extension HOT 8
- [feature request] trailing headers HOT 1
- Add support for Python 3.12
- DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13 HOT 1
- Daphne with self signed ssl HOT 2
- Daphne allows invalid characters within header names HOT 5
- Unix File Socket Argument HOT 12
- TypeError: object HttpResponse can't be used in 'await' expression HOT 3
- add support for --proxy-headers and friends in runserver HOT 4
- fd_endpoint.py is not properly installed HOT 7
- python manage.py runserver not working HOT 5
- Daphne - Twisted custom cipher list using set_cipher method HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from daphne.