Can't able to fetch variable value through method

I want to pass variable value from js file into py file using method. I have tried but it doesn’t work.
here is my code:
js file:

py file:

Please check any error on consoles of the path if there is no path errors then seems you are not able to pass value from JS itself for debugging you can pass some hard-coded value to pyfile and add some print statement to check if that values ae getting caught at server level

I checked that scenario, and it prints hard-coded value but whenever I pass value through HTML form and then try to call it in py file using method from js file then it doesn’t fetch that value

@Jignasa_Chavda what is the error you are facing ?

make sure you are triggering JS function