webhook not working

i read this article on dev commnity. i am getting a 500 error on the webhooks on github. error log on pythonanywhere shows this

2020-06-30 09:25:02,353: Not Found: /favicon.ico
2020-06-30 09:27:06,915: Internal Server Error: /update_server/
Traceback (most recent call last):
  File "/home/bluecrab/.virtualenvs/", line 34, in inner
    response = get_response(request)
  File "/home/bluecrab/.virtualenvs/", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/bluecrab/.virtualenvs/", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/bluecrab/.virtualenvs/", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/bluecrab/", line 49, in update
  File "/home/bluecrab/.virtualenvs/", line 816, in pull
    res = self._get_fetch_info_from_stderr(proc, progress)
  File "/home/bluecrab/.virtualenvs/", line 676, in _get_fetch_info_from_stderr
  File "/home/bluecrab/.virtualenvs/", line 408, in wait
    raise GitCommandError(self.args, status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
  cmdline: git pull -v origin
  stderr: 'fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.


i ca'n't seem to figure out whats wrong. the website is live though. kindlly check.

Could you post the exact code that you have in your update view?


def update(request):
    if request.method == "POST":
        pass the path of the diectory where your project will be
        stored on PythonAnywhere in the git.Repo() as parameter.
        Here the name of my directory is ""
        repo = git.Repo("")
        origin = repo.remotes.origin


        return HttpResponse("Updated code on PythonAnywhere")
        return HttpResponse("Couldn't update the code on PythonAnywhere")

Can you git pull in that repo in a Bash console?

( 09:38 ~/ (master)$ git pull
The authenticity of host ' (' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ',' (RSA) to the list of known hosts.
Enter passphrase for key '/home/bluecrab/.ssh/id_rsa':
remote: Enumerating objects: 4, done. remote: Counting objects: 100% (4/4), done. remote: Compressing objects: 100% (3/3), done. remote: Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 Unpacking objects: 100% (3/3), done.
be770b2..9c9dfed master -> origin/master
Updating ace1da7..9c9dfed
error: Your local changes to the following files would be overwritten by merge:
Please, commit your changes or stash them before you can merge.

i ran git commit too

( 17:38 ~/ (master)$ git commit -m "changed another view r"

*** Please tell me who you are.


  git config --global ""                                                                                                  
  git config --global "Your Name"

to set your account's default identity.                                                                                                             
Omit --global to set the identity only in this repository.

fatal: empty ident name (for <bluecrab@4261811f904c>) not allowed                                                                                   
( 17:41 ~/ (master)$ git config --global ""                 
( 17:42 ~/ (master)$ git config --global "myusername"                                   
( 17:43 ~/ (master)$ git commit -m "changed another view r"
On branch master                                                                                                                                    
Your branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.                                                                      
  (use "git pull" to update your local branch)                                                                                                      
Changes not staged for commit:                                                                                                                      
        modified:   abott/                                                                                                                  
        modified:   twee/

Untracked files:                                                                                                                                    

You have local changes and, if you pulled, they would be overwritten. You need to either commit them, stash them or checkout the files to revert them.

Your commits did not commit anything because you did not 'git add' the files in question before your committed.

i have done this. i am not sure this is the reason why my github webhooks is not delivering.

well, i have gotten it to work.