Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    ModuleNotFoundError

    Python SDK
    4
    8
    180
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • charlotteemma4
      charlotteemma4 last edited by

      Python38-32\lib\site-packages\smartapi\webSocket.py", line 12, in <module>
      from twisted.internet import reactor, ssl
      ModuleNotFoundError: No module named 'twisted'

      Error in--from smartapi import SmartConnect, SmartSocket

      S J 2 Replies Last reply Reply Quote 0
      • S
        Surya 1 @charlotteemma4 last edited by

        @hardip API is based on twisted and autobahn packages. If you have used pip both would be installed by default. One another issue could be that python is not able to see packagers due to multi installations.

        charlotteemma4 1 Reply Last reply Reply Quote 0
        • J
          jiwan1986 @charlotteemma4 last edited by

          @hardip You can install it through pip. pip install twisted

          1 Reply Last reply Reply Quote 0
          • charlotteemma4
            charlotteemma4 @Surya 1 last edited by

            @rajanprabu
            Thanks to all , done

            Ramesh 0 1 Reply Last reply Reply Quote 0
            • Ramesh 0
              Ramesh 0 @charlotteemma4 last edited by Ramesh 0

              @hardip Mate, I was installed 'twisted' as @rajanprabu said but I am getting another error. The package seems to have some module missing:

              542bb2f0-38dc-4ad9-a61b-20f0ec4d503f-image.png

              Is this something any of you encountered? If so, how were you able to get around it?

              Thank you so much for the help guys 🙂

              EDIT: I have also tried the other variant of import (from smartapi.smartConnect import SmartConnect) but still no luck.

              S 1 Reply Last reply Reply Quote 0
              • S
                Surya 1 @Ramesh 0 last edited by

                @A224819 Make sure you have the latest smartapi-python. And install smartapi using pip and it will install all dependencies. In short looks like you dont have openssl as it says.. But I dont have much experience with windows.

                Ramesh 0 1 Reply Last reply Reply Quote 0
                • Ramesh 0
                  Ramesh 0 @Surya 1 last edited by

                  @rajanprabu Mate, I did think of it and tried uninstalling and re-installing the package:
                  0f1eedac-1fae-4c60-b047-7cff2de8b65d-image.png
                  b7c694d1-e265-4bcb-a0b6-eabde5fa17bc-image.png
                  Still the same issue:
                  3720b0dc-7056-439b-87f7-943f5eb58ff2-image.png
                  Here is the debug:
                  4ebbafc6-e453-45b0-a1f2-0b6420deae39-image.png

                  Also, I am also a Linux user

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    Surya 1 @Ramesh 0 last edited by

                    @A224819

                    @A224819 said in ModuleNotFoundError:

                    Also, I am also a Linux user

                    thats a surprise. Error says No module named openssl. so find in the web how to install openssl python package and openssl libraries for your linux.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post