Skip to content

Uploading error #593

@Xprogrammer777

Description

@Xprogrammer777

I ran with -d to know where the error was coming from but didn't understand anything:

1.0
Linux 264142e94d17 6.1.58+ #1 SMP PREEMPT_DYNAMIC Sat Nov 18 15:31:17 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 22.04.3 LTS \n \l

+ RESPONSE_FILE=/tmp/du_resp_debug
+ [[ '' == '' ]]
+ BIN_DEPS='sed basename date grep stat dd mkdir curl'
+ CURL_BIN=curl
+ which sed basename date grep stat dd mkdir curl
+ [[ 0 != 0 ]]
+ which readlink
+ [[ 0 == 0 ]]
++ readlink -m //test
+ [[ /test == \/\t\e\s\t ]]
+ HAVE_READLINK=1
+ builtin printf ''
+ [[ 0 == 0 ]]
+ PRINTF='builtin printf'
+ PRINTF_OPT='-v o'
+ [[ -e /root/.dropbox_uploader ]]
+ source /root/.dropbox_uploader
+ [[ '' != '' ]]
+ [[ '' != '' ]]
+ [[ sl.Bw5MpHQ7OkKdP5S3OsOj63TvaEMRrbumBpDdPqfCVycmGSkjYkg5ZghKYXtivuq-wCiKByUpbXVAbtFT62Ws_0RwsuTQuvEYi_9OK4ZB6j7tDVj9jFocLFdniUk15pnUJJe3As8-WgKP = '' ]]
+ COMMAND=upload
+ ARG1=model.pth
+ ARG2=model1.pth
+ let argnum=4-2
+ case $COMMAND in
+ [[ 2 -lt 2 ]]
+ FILE_DST=model1.pth
+ (( i=OPTIND+1 ))
+ (( i<4 ))
+ FILE_SRC=model.pth
+ db_upload model.pth /model1.pth
++ normalize_path model.pth
+++ builtin printf model.pth
++ path=model.pth
++ [[ 1 == 1 ]]
+++ readlink -m model.pth
++ new_path=/content/model.pth
++ [[ h == \/ ]]
++ echo /content/model.pth
+ local SRC=/content/model.pth
++ normalize_path /model1.pth
+++ builtin printf /model1.pth
++ path=/model1.pth
++ [[ 1 == 1 ]]
+++ readlink -m /model1.pth
++ new_path=/model1.pth
++ [[ h == \/ ]]
++ echo /model1.pth
+ local DST=/model1.pth
+ [[ ! -e /content/model.pth ]]
+ [[ ! -r /content/model.pth ]]
++ db_stat /model1.pth
+++ normalize_path /model1.pth
++++ builtin printf /model1.pth
+++ path=/model1.pth
+++ [[ 1 == 1 ]]
++++ readlink -m /model1.pth
+++ new_path=/model1.pth
+++ [[ h == \/ ]]
+++ echo /model1.pth
++ local FILE=/model1.pth
++ [[ /model1.pth == \/ ]]
++ curl -X POST -L -s --show-error --globoff -i -o /tmp/du_resp_debug --header 'Authorization: Bearer sl.Bw5MpHQ7OkKdP5S3OsOj63TvaEMRrbumBpDdPqfCVycmGSkjYkg5ZghKYXtivuq-wCiKByUpbXVAbtFT62Ws_0RwsuTQuvEYi_9OK4ZB6j7tDVj9jFocLFdniUk15pnUJJe3As8-WgKP' --header 'Content-Type: application/json' --data '{"path": "/model1.pth"}' https://api.dropboxapi.com/2/files/get_metadata
++ check_http_response
++ CODE=0
++ case $CODE in
++ grep -q 'HTTP/1.1 400' /tmp/du_resp_debug
+++ sed -n 's/{".tag": *"*\([^"]*\)"*.*/\1/p' /tmp/du_resp_debug
++ local 'TYPE={"error":missing_scope'
++ case $TYPE in
++ echo ERR
+ TYPE=ERR
+ [[ ERR == \F\I\L\E ]]
+ [[ ERR == \E\R\R ]]
+ [[ h != \/ ]]
+ DST=/model1.pth
+ [[ -d /content/model.pth ]]
+ [[ -e /content/model.pth ]]
+ db_upload_file /content/model.pth /model1.pth
++ normalize_path /content/model.pth
+++ builtin printf /content/model.pth
++ path=/content/model.pth
++ [[ 1 == 1 ]]
+++ readlink -m /content/model.pth
++ new_path=/content/model.pth
++ [[ h == \/ ]]
++ echo /content/model.pth
+ local FILE_SRC=/content/model.pth
++ normalize_path /model1.pth
+++ builtin printf /model1.pth
++ path=/model1.pth
++ [[ 1 == 1 ]]
+++ readlink -m /model1.pth
++ new_path=/model1.pth
++ [[ h == \/ ]]
++ echo /model1.pth
+ local FILE_DST=/model1.pth
+ shopt -s nocasematch
++ basename /model1.pth
+ basefile_dst=model1.pth
+ [[ model1.pth == \t\h\u\m\b\s\.\d\b ]]
+ [[ model1.pth == \d\e\s\k\t\o\p\.\i\n\i ]]
+ [[ model1.pth == \.\d\s\_\s\t\o\r\e ]]
+ [[ model1.pth == \i\c\o\n\\\r ]]
+ [[ model1.pth == \.\d\r\o\p\b\o\x ]]
+ [[ model1.pth == \.\d\r\o\p\b\o\x\.\a\t\t\r ]]
+ shopt -u nocasematch
++ file_size /content/model.pth
+++ stat --format=%s /content/model.pth
++ SIZE=1868275926
++ '[' 0 -eq 0 ']'
++ echo 1868275926
++ return
+ FILE_SIZE=1868275926
++ db_stat /model1.pth
+++ normalize_path /model1.pth
++++ builtin printf /model1.pth
+++ path=/model1.pth
+++ [[ 1 == 1 ]]
++++ readlink -m /model1.pth
+++ new_path=/model1.pth
+++ [[ h == \/ ]]
+++ echo /model1.pth
++ local FILE=/model1.pth
++ [[ /model1.pth == \/ ]]
++ curl -X POST -L -s --show-error --globoff -i -o /tmp/du_resp_debug --header 'Authorization: Bearer sl.Bw5MpHQ7OkKdP5S3OsOj63TvaEMRrbumBpDdPqfCVycmGSkjYkg5ZghKYXtivuq-wCiKByUpbXVAbtFT62Ws_0RwsuTQuvEYi_9OK4ZB6j7tDVj9jFocLFdniUk15pnUJJe3As8-WgKP' --header 'Content-Type: application/json' --data '{"path": "/model1.pth"}' https://api.dropboxapi.com/2/files/get_metadata
++ check_http_response
++ CODE=0
++ case $CODE in
++ grep -q 'HTTP/1.1 400' /tmp/du_resp_debug
+++ sed -n 's/{".tag": *"*\([^"]*\)"*.*/\1/p' /tmp/du_resp_debug
++ local 'TYPE={"error":missing_scope'
++ case $TYPE in
++ echo ERR
+ TYPE=ERR
+ [[ ERR != \E\R\R ]]
+ [[ ERR != \E\R\R ]]
+ [[ 1868275926 -gt 157286000 ]]
+ db_chunked_upload_file /content/model.pth /model1.pth
++ normalize_path /content/model.pth
+++ builtin printf /content/model.pth
++ path=/content/model.pth
++ [[ 1 == 1 ]]
+++ readlink -m /content/model.pth
++ new_path=/content/model.pth
++ [[ h == \/ ]]
++ echo /content/model.pth
+ local FILE_SRC=/content/model.pth
++ normalize_path /model1.pth
+++ builtin printf /model1.pth
++ path=/model1.pth
++ [[ 1 == 1 ]]
+++ readlink -m /model1.pth
++ new_path=/model1.pth
++ [[ h == \/ ]]
++ echo /model1.pth
+ local FILE_DST=/model1.pth
+ [[ 0 == 1 ]]
+ VERBOSE=0
+ CURL_PARAMETERS='-L -s'
++ file_size /content/model.pth
+++ stat --format=%s /content/model.pth
++ SIZE=1868275926
++ '[' 0 -eq 0 ']'
++ echo 1868275926
++ return
+ local FILE_SIZE=1868275926
+ local OFFSET=0
+ local UPLOAD_ID=
+ local UPLOAD_ERROR=0
+ local CHUNK_PARAMS=
+ let 'NUMBEROFCHUNK=(1868275926/1024/1024+50-1)/50'
+ [[ 0 == 1 ]]
+ print ' > Uploading "/content/model.pth" to "/model1.pth" by 36 chunks '
+ [[ 0 == 0 ]]
+ echo -ne ' > Uploading "/content/model.pth" to "/model1.pth" by 36 chunks '
 > Uploading "/content/model.pth" to "/model1.pth" by 36 chunks + curl -X POST -L -s --show-error --globoff -i -o /tmp/du_resp_debug --header 'Authorization: Bearer sl.Bw5MpHQ7OkKdP5S3OsOj63TvaEMRrbumBpDdPqfCVycmGSkjYkg5ZghKYXtivuq-wCiKByUpbXVAbtFT62Ws_0RwsuTQuvEYi_9OK4ZB6j7tDVj9jFocLFdniUk15pnUJJe3As8-WgKP' --header 'Dropbox-API-Arg: {"close": false}' --header 'Content-Type: application/octet-stream' --data-binary @/dev/null https://content.dropboxapi.com/2/files/upload_session/start
+ check_http_response
+ CODE=0
+ case $CODE in
+ grep -q 'HTTP/1.1 400' /tmp/du_resp_debug
++ sed -n 's/{"session_id": *"*\([^"]*\)"*.*/\1/p' /tmp/du_resp_debug
+ SESSION_ID=
+ chunkNumber=1
+ [[ 0 != \1\8\6\8\2\7\5\9\2\6 ]]
+ let OFFSET_MB=0/1024/1024
+ dd if=/content/model.pth of=/tmp/du_chunk_29499 bs=1048576 skip=0 count=50
++ file_size /tmp/du_chunk_29499
+++ stat --format=%s /tmp/du_chunk_29499
++ SIZE=52428800
++ '[' 0 -eq 0 ']'
++ echo 52428800
++ return
+ local CHUNK_REAL_SIZE=52428800
+ [[ 0 == 1 ]]
+ echo
+ curl -X POST -L -s --show-error --globoff -i -o /tmp/du_resp_debug --header 'Authorization: Bearer sl.Bw5MpHQ7OkKdP5S3OsOj63TvaEMRrbumBpDdPqfCVycmGSkjYkg5ZghKYXtivuq-wCiKByUpbXVAbtFT62Ws_0RwsuTQuvEYi_9OK4ZB6j7tDVj9jFocLFdniUk15pnUJJe3As8-WgKP' --header 'Dropbox-API-Arg: {"cursor": {"session_id": "","offset": 0},"close": false}' --header 'Content-Type: application/octet-stream' --data-binary @/tmp/du_chunk_29499 https://content.dropboxapi.com/2/files/upload_session/append_v2
+ grep -q '^HTTP/1.1 200 OK' /tmp/du_resp_debug
+ [[ 0 != 1 ]]
+ print '*'
+ [[ 0 == 0 ]]
+ echo -ne '*'
*+ let UPLOAD_ERROR=0+1
+ [[ 1 -gt 2 ]]
+ [[ 0 != \1\8\6\8\2\7\5\9\2\6 ]]
+ let OFFSET_MB=0/1024/1024
+ dd if=/content/model.pth of=/tmp/du_chunk_29499 bs=1048576 skip=0 count=50
++ file_size /tmp/du_chunk_29499
+++ stat --format=%s /tmp/du_chunk_29499
++ SIZE=52428800
++ '[' 0 -eq 0 ']'
++ echo 52428800
++ return
+ local CHUNK_REAL_SIZE=52428800
+ [[ 0 == 1 ]]
+ echo
+ curl -X POST -L -s --show-error --globoff -i -o /tmp/du_resp_debug --header 'Authorization: Bearer sl.Bw5MpHQ7OkKdP5S3OsOj63TvaEMRrbumBpDdPqfCVycmGSkjYkg5ZghKYXtivuq-wCiKByUpbXVAbtFT62Ws_0RwsuTQuvEYi_9OK4ZB6j7tDVj9jFocLFdniUk15pnUJJe3As8-WgKP' --header 'Dropbox-API-Arg: {"cursor": {"session_id": "","offset": 0},"close": false}' --header 'Content-Type: application/octet-stream' --data-binary @/tmp/du_chunk_29499 https://content.dropboxapi.com/2/files/upload_session/append_v2
+ grep -q '^HTTP/1.1 200 OK' /tmp/du_resp_debug
+ [[ 0 != 1 ]]
+ print '*'
+ [[ 0 == 0 ]]
+ echo -ne '*'
*+ let UPLOAD_ERROR=1+1
+ [[ 2 -gt 2 ]]
+ [[ 0 != \1\8\6\8\2\7\5\9\2\6 ]]
+ let OFFSET_MB=0/1024/1024
+ dd if=/content/model.pth of=/tmp/du_chunk_29499 bs=1048576 skip=0 count=50
++ file_size /tmp/du_chunk_29499
+++ stat --format=%s /tmp/du_chunk_29499
++ SIZE=52428800
++ '[' 0 -eq 0 ']'
++ echo 52428800
++ return
+ local CHUNK_REAL_SIZE=52428800
+ [[ 0 == 1 ]]
+ echo
+ curl -X POST -L -s --show-error --globoff -i -o /tmp/du_resp_debug --header 'Authorization: Bearer sl.Bw5MpHQ7OkKdP5S3OsOj63TvaEMRrbumBpDdPqfCVycmGSkjYkg5ZghKYXtivuq-wCiKByUpbXVAbtFT62Ws_0RwsuTQuvEYi_9OK4ZB6j7tDVj9jFocLFdniUk15pnUJJe3As8-WgKP' --header 'Dropbox-API-Arg: {"cursor": {"session_id": "","offset": 0},"close": false}' --header 'Content-Type: application/octet-stream' --data-binary @/tmp/du_chunk_29499 https://content.dropboxapi.com/2/files/upload_session/append_v2
+ grep -q '^HTTP/1.1 200 OK' /tmp/du_resp_debug
+ [[ 0 != 1 ]]
+ print '*'
+ [[ 0 == 0 ]]
+ echo -ne '*'
*+ let UPLOAD_ERROR=2+1
+ [[ 3 -gt 2 ]]
+ print ' FAILED\n'
+ [[ 0 == 0 ]]
+ echo -ne ' FAILED\n'
 FAILED
+ print 'An error occurred requesting /chunked_upload\n'
+ [[ 0 == 0 ]]
+ echo -ne 'An error occurred requesting /chunked_upload\n'
An error occurred requesting /chunked_upload
+ ERROR_STATUS=1
+ return
+ (( i++  ))
+ (( i<4 ))
+ remove_temp_files
+ [[ 1 == 0 ]]
+ [[ 1 -ne 0 ]]
+ echo 'Some error occured. Please check the log.'
Some error occured. Please check the log.
+ exit 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions