问题描述
file = repo.get_contents('test.csv',ref="main")
data = file.decoded_content.decode("utf-8")
data += "\n test;test;test"
repo.update_file(file.path,"automatic update",data,file.sha,branch='main')
最后一行返回一个神秘的错误堆栈:github.GithubException.UnkNownObjectException: 404 {"message": "Not Found","documentation_url": "https://docs.github.com/rest/reference/repos#create-or-update-file-contents"}
get 方法似乎有效,因为它允许我打印出文件的原始内容。任何指针,为什么 update_file 方法不起作用?
TIA!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)