No module named 'logzero'


  • Getting this error while running smartapi
    import SmartApi
    Traceback (most recent call last):
    File "<pyshell#2>", line 1, in <module>
    import SmartApi
    File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\site-packages\SmartApi_init_.py", line 3, in <module>
    from SmartApi.smartConnect import SmartConnect
    File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\site-packages\SmartApi\smartConnect.py", line 10, in <module>
    import logzero
    ModuleNotFoundError: No module named 'logzero'


  • @kn (No need of installing manually in most of the cases) but make sure you have these before running

    1. json
    2. logging
    3. socket
    4. logzero

    These are used in different classes going forward.


  • @kn

    Kindly run below commands to install logzero
    pip install logzero

    Regars,
    SmartAPI Team