Giter Site home page Giter Site logo

Comments (9)

Muhammad-Soban avatar Muhammad-Soban commented on May 23, 2024 7

I have fixed the issue using the following command

pip install --upgrade pyopenssl

Thanks

from daphne.

andrewgodwin avatar andrewgodwin commented on May 23, 2024 3

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.

andrewgodwin avatar andrewgodwin commented on May 23, 2024

Can I get the full traceback please? The error itself doesn't give enough information.

from daphne.

Muhammad-Soban avatar Muhammad-Soban commented on May 23, 2024

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.

andrewgodwin avatar andrewgodwin commented on May 23, 2024

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.

tivoni23 avatar tivoni23 commented on May 23, 2024

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.

tivoni23 avatar tivoni23 commented on May 23, 2024

I ran brew upgrade and now it's working!
Thank you

from daphne.

ravitejar272 avatar ravitejar272 commented on May 23, 2024

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.

proofit404 avatar proofit404 commented on May 23, 2024

Hi. Check your twisted installation. I suspect you've missed some python package to install.

from daphne.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.