From 94c8c42aa5fd9defa8eee6a3dbad3c7289b11b9f Mon Sep 17 00:00:00 2001 From: Isaac Lin Date: Thu, 8 Oct 2020 20:49:14 +0800 Subject: [PATCH] Bug fixed for uploading content rather than string of the path --- script.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/script.py b/script.py index b1a4cac46..f96b33d08 100644 --- a/script.py +++ b/script.py @@ -86,8 +86,11 @@ def github_manager(): release.upload_asset( content_type='application/text', name=file.split('/')[-1], - asset=os.path.join( - os.path.split(os.path.realpath(__file__))[0], file + asset=open( + file=os.path.join( + os.path.split(os.path.realpath(__file__))[0], file + ), + mode='rb' ) )