我正在尝试连接到此组织githubtraining
这是我在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)
但每次我尝试渲染视图时都会收到此错误:
UnicodeEncodeError at /auth/
'ascii' codec can't encode character '\u200b' in position 24: ordinal not in range(128)
这是因为我的电话有问题吗?
或许那里还有别的东西?
答案 0 :(得分:1)
您是否检查了模板Array
(
[iso.3.6.1.4.1.12356.101.12.2.4.1.3.1] => STRING: "sensitive_data_1"
[iso.3.6.1.4.1.12356.101.12.2.4.1.3.2] => STRING: "sensitive_data_2"
[iso.3.6.1.4.1.12356.101.12.2.4.1.3.3] => STRING: "sensitive_data_3"
[iso.3.6.1.4.1.12356.101.12.2.4.1.3.4] => STRING: "sensitive_data_4"
[iso.3.6.1.4.1.12356.101.12.2.4.1.3.5] => STRING: "sensitive_data_5"
[iso.3.6.1.4.1.12356.101.12.2.4.1.3.6] => STRING: "sensitive_data_6"
[iso.3.6.1.4.1.12356.101.12.2.4.1.3.7] => STRING: "sensitive_data_7"
[iso.3.6.1.4.1.12356.101.12.2.4.1.3.8] => STRING: "sensitive_data_8"
)
的编码?
确保文本编辑器的文件设置正在使用unicode。