This page provides step-by-step instructions for using a Python script to create consumers for mGramSeva. Follow these guidelines to load consumer data into the system using the Python script provided.
Before running the script, ensure you have a properly formatted Excel sheet. The sheet should include the following columns:
Consumer Name (Mandatory, use "NA" if not available)
Gender (Male/Female)
Father Name (Mandatory, use "NA" if not available)
Mobile Number (Mandatory)
Old Connection Number
Property Type
Service Type (till now in we have Non-metered only for data loading)
Ward (Always set to "Ward 1")
Meter Reading (If available, use provided date; otherwise, default to "12/01/2022")
GPWSC Name
Arrears
Previous Reading ((if arrears and previous reading are not given, write '0')
Ensure the format of the meter reading matches the provided sample format given in excel file below, as incorrect formatting may lead to loading failures.
Edit the Python script with the following details:
Set the host URL based on whether it's for production, QA, or UAT.
Provide the username and password corresponding to your host URL.
Specify the path where your Excel file is stored. It is recommended to store the Excel file in the same location as your Python script.
Execute the Python script after configuring the host URL, username, password, and file path. The script will load data into mGramSeva based on the information provided in the Excel sheet.
Do not open the Excel file until the script completes its task. After completion, open the Excel file to check the status. The status will indicate whether the operation was successful or if there was a failure. If there's a failure, refer to the provided reason for further investigation and resolution.