I am new to Python and started using your api in python. Using following code by going through few videos on youtube and your codes.
from smartapi import SmartConnect #or from smartapi.smartConnect import SmartConnect
#import smartapi.smartExceptions(for smartExceptions)
is generating error
PS C:\Users\DELL> & C:/Users/DELL/AppData/Local/Programs/Python/Python311/python.exe d:/Manish/Python/smartapi.py
Traceback (most recent call last):
File "d:\Manish\Python\smartapi.py", line 1, in <module>
from smartapi import SmartConnect #or from smartapi.smartConnect import SmartConnect
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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) (d:\Manish\Python\smartapi.py)
PS C:\Users\DELL> & C:/Users/DELL/AppData/Local/Programs/Python/Python311/python.exe d:/Manish/Python/smartapi.py
Traceback (most recent call last):
File "d:\Manish\Python\smartapi.py", line 5, in <module>
obj=SmartConnect(api_key="ig3amEvr")
^^^^^^^^^^^^
NameError: name 'SmartConnect' is not defined
PS C:\Users\DELL> & C:/Users/DELL/AppData/Local/Programs/Python/Python311/python.exe d:/Manish/Python/smartapi.py
Traceback (most recent call last):
File "d:\Manish\Python\smartapi.py", line 1, in <module>
from smartapi import SmartConnect #or from smartapi.smartConnect import SmartConnect
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\Manish\Python\smartapi.py", line 1, 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) (d:\Manish\Python\smartapi.py)
Please help.
My contact details are manishashar888@gmail.com / 9173605833