Closed
Description
I'm using the following code in a script and cannot get the sample file upload code to work. I also cannot get a meaningful exception from the Python-Gitlab library. The only exception returned is an AttributeError with a single key 'upload_file'.
Using Python 3.6.2 on macOS
project = gl.projects.get('vogon/bypass')
issue = project.issues.get(42)
try:
uploaded_file = project.upload_file("the_answer_to_life.txt",
filedata="data")
issue.notes.create({
"body": "See the [attached file]
({})".format(uploaded_file["url"])
})
except Exception as e:
self.log.debug(e[0])
Metadata
Metadata
Assignees
Labels
No labels