Navigation

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

    Import error

    Python SDK
    2
    8
    88
    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.
    • A
      aarohi last edited by

      PS C:\Users\hp\Desktop> & C:/Users/hp/AppData/Local/Programs/Python/Python39/python.exe "g:/Angel Broking/Smart API/Python/from smartapi import SmartConnect.py"
      Traceback (most recent call last):
      File "g:\Angel Broking\Smart API\Python\from smartapi import SmartConnect.py", line 1, in <module>
      from smartapi.smartConnect import SmartConnect
      File "g:\Angel Broking\Smart API\Python\smartapi.py", line 2, in <module>
      from smartapi import SmartConnect #or from smartapi.smartConnect import SmartConnect
      ImportError: cannot import name 'SmartConnect' from partially initialized module 'smartapi' (most likely due to a circular import) (g:\Angel Broking\Smart API\Python\smartapi.py)
      PS C:\Users\hp\Desktop> & C:/Users/hp/AppData/Local/Programs/Python/Python39/python.exe "g:/Angel Broking/Smart API/Python/from smartapi import SmartConnect.py"
      Traceback (most recent call last):
      File "g:\Angel Broking\Smart API\Python\from smartapi import SmartConnect.py", line 1, in <module>
      import smartapi.smartExceptions
      File "g:\Angel Broking\Smart API\Python\smartapi.py", line 2, in <module>
      from smartapi import SmartConnect #or from smartapi.smartConnect import SmartConnect
      ImportError: cannot import name 'SmartConnect' from partially initialized module 'smartapi' (most likely due to a circular import) (g:\Angel Broking\Smart API\Python\smartapi.py)
      PS C:\Users\hp\Desktop> & C:/Users/hp/AppData/Local/Programs/Python/Python39/python.exe "g:/Angel Broking/Smart API/Python/from smartapi import SmartConnect.py"
      Traceback (most recent call last):
      File "g:\Angel Broking\Smart API\Python\from smartapi import SmartConnect.py", line 1, in <module>
      from smartapi import SmartConnect
      File "g:\Angel Broking\Smart API\Python\smartapi.py", line 2, in <module>
      from smartapi import SmartConnect #or from smartapi.smartConnect import SmartConnect
      ImportError: cannot import name 'SmartConnect' from partially initialized module 'smartapi' (most likely due to a circular import) (g:\Angel Broking\Smart API\Python\smartapi.py)

      A 1 Reply Last reply Reply Quote 0
      • A
        admin @aarohi last edited by

        HI @aarohi kindly reinstall smartapi.

        A 1 Reply Last reply Reply Quote 0
        • A
          aarohi @admin last edited by

          @admin problem still pertains

          A 1 Reply Last reply Reply Quote 0
          • A
            admin @aarohi last edited by

            Hi @aarohi We tested it from our end and we are able to get response from our end.You need to debug your issue from your end.

            A 1 Reply Last reply Reply Quote 0
            • A
              aarohi @admin last edited by

              @admin runfile('C:/Users/AROHI/smartapi.py', wdir='C:/Users/AROHI')
              Traceback (most recent call last):

              File "C:\Users\AROHI\smartapi.py", line 7, in <module>
              from smartapi import SmartConnect

              File "C:\Users\AROHI\smartapi.py", line 7, in <module>
              from smartapi import SmartConnect

              ImportError: cannot import name 'SmartConnect' from 'smartapi' (C:\Users\AROHI\smartapi.py)

              debugfile('C:/Users/AROHI/smartapi.py', wdir='C:/Users/AROHI')

              c:\users\arohi\smartapi.py(6)<module>()
              3 Created on Fri May 28 21:00:30 2021
              4
              5 @author: AROHI
              ----> 6 """
              7 from smartapi import SmartConnect

              A 1 Reply Last reply Reply Quote 0
              • A
                aarohi @aarohi last edited by

                @aarohi 4a6627b4-e987-4bba-b11c-2b4301efe787-image.png

                A 2 Replies Last reply Reply Quote 0
                • A
                  admin @aarohi last edited by

                  Hi @aarohi you have imported smartconnect and you have not used it so there is no error in this.

                  1 Reply Last reply Reply Quote 0
                  • A
                    admin @aarohi last edited by

                    Hi @aarohi you can go through some programming tutorials to understand how python works.

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