Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7965851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:15:55+00:00 2026-06-04T06:15:55+00:00

I am programming a ssl client to my server where it uses python twisted

  • 0

I am programming a ssl client to my server where it uses python twisted with pyqt4, I used QTReactor for twisted in PYQT but when I run the code there is an error

AttributeError: 'NoneType' object has no attribute 'connectSSL'

my initial code it like this

from OpenSSL import SSL
import sys
from twisted.internet.protocol import ClientFactory
from twisted.protocols.basic import LineReceiver
from twisted.internet import ssl
import qt4reactor

app = QtGui.QApplication(sys.argv)
reactor=qt4reactor.install()
main()
myapp = MainForm()
myapp.show()
reactor.runReturn()
sys.exit(app.exec_())

def main():
    factory = ClientFactory()
    reactor.connectSSL('localhost', 8080, factory, ssl.ClientContextFactory())
    try:
        reactor.run()
    except KeyboardInterrupt:
        reactor.stop()

the error when i run it:

Traceback (most recent call last):
  File "client.py", line 51, in <module>
    main()
  File "client.py", line 40, in main
    reactor.connectSSL('localhost', 8080, factory, ssl.ClientContextFactory())
AttributeError: 'NoneType' object has no attribute 'connectSSL'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T06:15:57+00:00Added an answer on June 4, 2026 at 6:15 am

    AttributeError: ‘NoneType’ object has no attribute ‘connectSSL’

    is the error message that you get when you try to invoke a method on None.

    This line of code

    reactor=qt4reactor.install()
    

    is the only place where reactor is assigned. The error message makes it clear that reactor is being assigned the value None.

    All the web search hits that I can find on the topic follow this pattern:

    qt4reactor.install(app)
    from twisted.internet import reactor
    

    and so I guess that’s how you are meant to do it. But I do confess to knowing precisely nothing about these frameworks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Which programming language(s) were used to code Windows Vista?
Programming is learned by writing programs. But code reading is said to be another
While not entirely programming related. I recently purchased a SSL certificate, and during the
Fairly new to socket programming, but I've been assigned with a whopper of project.
Hi I am trying out a simple java http server NanoHTTPD: http://elonen.iki.fi/code/nanohttpd/ Today I
When programming C++ we used to create copy constructors when needed (or so we
I'm reading an openssl programming tutorial . I can't let a server app to
Im programming C# WinForm application which have big SQL Server Database. I need to
I've been programming for a long time now, but I'm not the world's most
Do you guys know fine tutorials, sample codes for SSL socket programming with Jetty?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.