Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Yuuichi Hosono
6 years agoHelpful | Level 6
dropboxのAPIでupload命令を使っていますが、データ送受信が出来なくなった
こんにちは。私は日本の細野祐一といいます。 dropboxのAPIでupload命令を使ってラズベリーパイとdropboxのファイルの送受信をしています。 しかし昨日、そのデータの送受信が突然途切れました。 使い方は、以下の様になっています。 API:Dropbox API type of access:Full Dropbox
この使い方は不安定なのでしょうか?
- 6 years ago
Dropbox APIはHTTPS要求と応答を介して機能するため、理想的には、失敗した呼び出しの完全なHTTPS要求と応答を出力してこれをデバッグします。応答ヘッダーと本文には、失敗に関する情報が含まれています。
これがツールで実行できる設定でない場合は、ツールの開発者に問い合わせてください。
-----------–
読みやすい翻訳をご提供できず申し訳ございません。当社からの返答にはオンライン翻訳を使用しています。どの言語にも対応することが理想ではありますが、現時点ではそれが可能ではありません。こちらが英語版です。
-----------–
Please excuse our translations. Our responses were created using an online translator. We'd like to support every language, but we're not currently equipped to do so. Here is the English version:
-----------–The Dropbox API works via HTTPS requests and responses, so ideally you would print out the full HTTPS request and response for the failing call to debug this. The response headers and body would have some information about the failure.
If this isn't something you can configure the tool to do, please contact the developer of the tool for help.
Yuuichi Hosono
6 years agoHelpful | Level 6
使用しているプラットフォームとSDK /ライブラリの名前とバージョン番号(ある場合)
ラズベリーパイ3 raseiam jessie/dropbox uploader 1.0
関連するコードスニペットを含め、問題を再現する手順。ただし、アクセストークン自体は含めないでください。
download: ShareMaster
必ず発生します。
1か月半動いていたが。
以下のように急にダウンロードできなくなった。
エラーまたは予期しない出力の全文
pi@raspberrypi:~/senddata $ sudo python /home/pi/iot_kit/select_db.py ShareMaster
> Downloading folder "/demo_KAkit/program/data/fogfile/ShareMaster" to "/home/pi/ShareMaster"...
> Skipping file "/demo_KAkit/program/data/fogfile/ShareMaster/工程機械.csv", file exists with the same hash
> Skipping file "/demo_KAkit/program/data/fogfile/ShareMaster/raspiテーブル.csv", file exists with the same hash
> Skipping file "/demo_KAkit/program/data/fogfile/ShareMaster/従業員.csv", file exists with the same hash
> Skipping file "/demo_KAkit/program/data/fogfile/ShareMaster/作業指示書.csv", file exists with the same hash
> Downloading "/demo_KAkit/program/data/fogfile/ShareMaster/ICカード.csv" to "/home/pi/ShareMaster/ICカード.csv"... FAILED
Some error occured. Please check the log.
Greg-DB
Dropbox Community Moderator
6 years ago残念ながら、この出力はAPIからの実際のエラーを示していません。 Dropbox APIから受け取ったAPI応答を共有できますか?出力には、ログが含まれている可能性があることが記載されています。
-----------–
読みやすい翻訳をご提供できず申し訳ございません。当社からの返答にはオンライン翻訳を使用しています。どの言語にも対応することが理想ではありますが、現時点ではそれが可能ではありません。こちらが英語版です。
-----------–
Please excuse our translations. Our responses were created using an online translator. We'd like to support every language, but we're not currently equipped to do so. Here is the English version:
-----------–
Unfortunately, this output does not show the actual error from the API. Can you share the API response that you're getting from the Dropbox API? The output does mention a log which may have it.
- Yuuichi Hosono6 years agoHelpful | Level 6
このLOGは、どうでしょうか?
pi@raspberrypi:~ $ cd /home/pi/iot_kit/DB/Dropbox-Uploader
pi@raspberrypi:~/iot_kit/DB/Dropbox-Uploader $ ./dropbox_uploader.sh -d download /demo_KAkit/program/data/fogfile/ShareMaster /home/pi/Raspberrypi_list
1.0
Linux raspberrypi 4.4.34-v7+ #930 SMP Wed Nov 23 15:20:41 GMT 2016 armv7l GNU/Linux
Raspbian GNU/Linux 8 \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 /home/pi/iot.config/db_config ]]
+ source /home/pi/iot.config/db_config
+ [[ '' != '' ]]
+ [[ '' != '' ]]
= '' ]]_token
+ COMMAND=download
+ ARG1=/demo_KAkit/program/data/fogfile/ShareMaster
+ ARG2=/home/pi/Raspberrypi_list
+ let argnum=4-2
+ case $COMMAND in
+ [[ 2 -lt 1 ]]
+ FILE_src=/demo_KAkit/program/data/fogfile/ShareMaster
+ FILE_DST=/home/pi/Raspberrypi_list
+ db_download //demo_KAkit/program/data/fogfile/ShareMaster /home/pi/Raspberrypi_list
++ normalize_path //demo_KAkit/program/data/fogfile/ShareMaster
+++ builtin printf /demo_KAkit/program/data/fogfile/ShareMaster
++ path=/demo_KAkit/program/data/fogfile/ShareMaster
++ [[ 1 == 1 ]]
+++ readlink -m /demo_KAkit/program/data/fogfile/ShareMaster
++ new_path=/demo_KAkit/program/data/fogfile/ShareMaster
++ [[ r == \/ ]]
++ echo /demo_KAkit/program/data/fogfile/ShareMaster
+ local src=/demo_KAkit/program/data/fogfile/ShareMaster
++ normalize_path /home/pi/Raspberrypi_list
+++ builtin printf /home/pi/Raspberrypi_list
++ path=/home/pi/Raspberrypi_list
++ [[ 1 == 1 ]]
+++ readlink -m /home/pi/Raspberrypi_list
++ new_path=/home/pi/Raspberrypi_list
++ [[ t == \/ ]]
++ echo /home/pi/Raspberrypi_list
+ local DST=/home/pi/Raspberrypi_list
++ db_stat /demo_KAkit/program/data/fogfile/ShareMaster
+++ normalize_path /demo_KAkit/program/data/fogfile/ShareMaster
++++ builtin printf /demo_KAkit/program/data/fogfile/ShareMaster
+++ path=/demo_KAkit/program/data/fogfile/ShareMaster
+++ [[ 1 == 1 ]]
++++ readlink -m /demo_KAkit/program/data/fogfile/ShareMaster
+++ new_path=/demo_KAkit/program/data/fogfile/ShareMaster
+++ [[ r == \/ ]]
+++ echo /demo_KAkit/program/data/fogfile/ShareMaster
++ local FILE=/demo_KAkit/program/data/fogfile/ShareMaster
++ [[ /demo_KAkit/program/data/fogfile/ShareMaster == \/ ]]
++ curl -X POST -L -s --show-error --globoff -i -o /tmp/du_resp_debug --header 'Authorization: Bearer <redacted>' --header 'Content-Type: application/json' --data '{"path": "/demo_KAkit/program/data/fogfile/ShareMaster"}' https://api.dropboxapi.com/2/files/get_metadata
++ check_http_response
++ CODE=0
++ case $CODE in
++ grep -q '^HTTP/[12].* 400' /tmp/du_resp_debug
+++ sed -n 's/{".tag": *"*\([^"]*\)"*.*/\1/p' /tmp/du_resp_debug
++ local 'TYPE={"error_summary": "path/not_found/...", "error": path'
++ case $TYPE in
++ echo ERR
+ TYPE=ERR
+ [[ ERR == \D\I\R ]]
+ [[ ERR == \F\I\L\E ]]
+ print ' > No such file or directory: /demo_KAkit/program/data/fogfile/ShareMaster\n'
+ [[ 0 == 0 ]]
+ echo -ne ' > No such file or directory: /demo_KAkit/program/data/fogfile/ShareMaster\n'
> No such file or directory: /demo_KAkit/program/data/fogfile/ShareMaster
+ ERROR_STATUS=1
+ return
+ 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
pi@raspberrypi:~/iot_kit/DB/Dropbox-Uploader $- Yuuichi Hosono6 years agoHelpful | Level 6
先ほどのはファイル名を間違えていました。こちらの方を見て下さい。
最後のエラーが出ている部分だけを送ります。
"/KAkit_azabuseikei/program/data/fogfile/Raspberrypi_list/000000001e47d39d_RaspberryPi_list.csv"}' https://content.dropboxapi.com/2/files/download
+ check_http_response
+ CODE=0
+ case $CODE in
+ grep -q '^HTTP/[12].* 400' /tmp/du_resp_debug
++ sed -n -e 's/{"error": "\([^"]*\)"}/\1/p' /tmp/du_resp_debug
+ ERROR_MSG=
+ case $ERROR_MSG in
+ grep -q '^HTTP/[12].* 200' /tmp/du_resp_debug
+ print 'FAILED\n'
+ [[ 0 == 0 ]]
+ echo -ne 'FAILED\n'
FAILED
+ rm -fr /home/pi/Raspberrypi_list/000000001e47d39d_RaspberryPi_list.csv
+ ERROR_STATUS=1
+ return
+ read -r line
+ rm -fr /tmp/du_tmp_out_27945
+ 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
pi@raspberrypi:~/iot_kit/DB/Dropbox-Uploader $- Greg-DB6 years ago
Dropbox Community Moderator
残念ながら、このログにはDropbox API自体からのエラー応答が表示されていないようです。そのため、これに基づいて多くの洞察を提供することはできません。トラブルシューティングについては、このサードパーティツールの開発者にお問い合わせください。
-----------–
読みやすい翻訳をご提供できず申し訳ございません。当社からの返答にはオンライン翻訳を使用しています。どの言語にも対応することが理想ではありますが、現時点ではそれが可能ではありません。こちらが英語版です。
-----------–
Please excuse our translations. Our responses were created using an online translator. We'd like to support every language, but we're not currently equipped to do so. Here is the English version:
-----------–Unfortunately, this log doesn't seem to show an error response from the Dropbox API itself, so I'm afraid I can't offer much insight based on this. Please reach out to the developer of this third party tool for help troubleshooting it.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!