1

I'm trying to connect to this org githubtraining

This is my code on views.py:

def home(request):
    global org
    email=request.GET['email']
    password=request.GET['password']
    g = Github("user", "paswword") 
    org = g.get_organization('githubtraining​')
    list_rep= org.get_repos()
    context = {
        'list_rep': list_rep,
        'org':org
    }

    return render(request, 'Github/repo.html',context)

But everytime I try to render the view I got this error:

UnicodeEncodeError at /auth/

'ascii' codec can't encode character '\u200b' in position 24: ordinal not in range(128)

Is this because of something wrong in my call?

Or maybe there's something else there?

NeoVe
  • 3,857
  • 8
  • 54
  • 134
  • 1
    \u200b is a zero-width space that is sometimes inserted [unintentionally](https://stackoverflow.com/questions/7055600/u200b-zero-width-space-characters-in-my-js-code-where-did-they-come-from). Did you do any copy/pasting with your code? Maybe check the content of that `repo.html`. – mcalex Feb 27 '18 at 07:23

1 Answers1

1

Did you check the encoding of your template Github/repo.html?

Make sure with the file settings of your text editor that it is using unicode.

luc
  • 41,928
  • 25
  • 127
  • 172