Skip to content

Fix: Incorrect argument 'secret' used in multiple example files #216

Description

@Adithya-bs

Problem: Keyword Argument Mismatch

The KiteConnect.generate_session method in kiteconnect/connect.py defines its second parameter as api_secret. However, several files in the examples/ directory incorrectly use the keyword argument secret.

When a user attempts to run these examples, it results in a TypeError: generate_session() got an unexpected keyword argument 'secret'.

Affected Files

The following files currently contain this error:

  • examples/simple.py
  • examples/gtt_order.py
  • examples/order_margins.py

To Reproduce

Run any of the affected example scripts. The execution fails at the session generation step:

data = kite.generate_session("request_token_here", secret="your_secret")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions