2

I am very new to angularjs. I am working on a code where depending on the output of the python file, the angularjs file should react differently. I keep getting this particular error

angular.js:10765 GET http://harsha.seq-technology.in/ajax/duplicate_check.py?q=0 500 (Internal Server Error)

what am i doing wrong ? my script file is as below:

$scope.save_me = function () {
   $scope.dup_yes=1;
   console.log("here");
   $http.get("/ajax/duplicate_check.py",{params{"q":0}}).then(function(response) {
       console.log("here2");
       console.log(response.data);

       if (response.data['login_status'] == 1 ){
          console.log("Mission is a Success\n");
       }
    })
}

my python file gives the output as follows:

Content-Type: application/json

{"login_status": 1}

Help is greatly appreciated.

2 Answers 2

1

This has nothing to do with angularjs, first be sure you make your "script" return a proper HTTP response with a 200 result code.

You can curl or wget to debug the result before doing anything else.

Sign up to request clarification or add additional context in comments.

Comments

1

my python file wasn't executable, hence the error. had to change file permissions. thanks!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.