<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error while uploading a zip file using Python script in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-while-uploading-a-zip-file-using-Python-script/m-p/294109#M17913</link>
    <description>Thanks, that did the trick...&lt;BR /&gt;But my script took 7 mins and 1.372 seconds. I guess that's to be expected given that the zip file is around 90 MB and I have a 250 kilobyte per sec broadband connection...&lt;BR /&gt;I'm curious though, is it because of Python 3 that larger files get "timed out" errors by default and I have to erase that limit by using timeout=None?</description>
    <pubDate>Mon, 27 Aug 2018 18:10:49 GMT</pubDate>
    <dc:creator>Apollonius</dc:creator>
    <dc:date>2018-08-27T18:10:49Z</dc:date>
    <item>
      <title>Error while uploading a zip file using Python script</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-while-uploading-a-zip-file-using-Python-script/m-p/293927#M17892</link>
      <description>&lt;P&gt;&amp;nbsp;I'm trying to write a Python script where there would be a list of "paths" to files and they would serially be uploaded to my Dropbox.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought of uploading a directory as a Zip archive if the list contains such an element. It's just a silly project but just for learning purposes. I'm using a shell script to Zip that archive that's called from the Python Script( I know I can do that using Python alone, but this just makes things more interesting!&lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@8BFF634FABEFCD8860E49834D32E544B/images/emoticons/1f601.png" alt=":grin:" title=":grin:" /&gt;).&lt;BR /&gt;&lt;BR /&gt;Here are the links to my code:&amp;nbsp;&lt;A href="https://gist.github.com/selectiveduplicate/0ddae3e1b93583e60028d796d01c1d2f" target="_blank"&gt;Python script&lt;/A&gt;,&amp;nbsp;&lt;A href="https://gist.github.com/selectiveduplicate/64517917465fafc4f127f441b94743ea" target="_self"&gt;Bash script&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I'm getting the following errors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Traceback (most recent call last):
File "/home/sakib/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/home/sakib/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 354, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1065, in _send_output
self.send(chunk)
File "/usr/lib/python3.6/http/client.py", line 986, in send
self.sock.sendall(data)
File "/usr/lib/python3.6/ssl.py", line 972, in sendall
v = self.send(byte_view[count:])
File "/usr/lib/python3.6/ssl.py", line 941, in send
return self._sslobj.write(data)
File "/usr/lib/python3.6/ssl.py", line 642, in write
return self._sslobj.write(data)
socket.timeout: The write operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/sakib/.local/lib/python3.6/site-packages/requests/adapters.py", line 445, in send
timeout=timeout
File "/home/sakib/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/home/sakib/.local/lib/python3.6/site-packages/urllib3/util/retry.py", line 367, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/home/sakib/.local/lib/python3.6/site-packages/urllib3/packages/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/home/sakib/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/home/sakib/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 354, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.6/http/client.py", line 1065, in _send_output
self.send(chunk)
File "/usr/lib/python3.6/http/client.py", line 986, in send
self.sock.sendall(data)
File "/usr/lib/python3.6/ssl.py", line 972, in sendall
v = self.send(byte_view[count:])
File "/usr/lib/python3.6/ssl.py", line 941, in send
return self._sslobj.write(data)
File "/usr/lib/python3.6/ssl.py", line 642, in write
return self._sslobj.write(data)
urllib3.exceptions.ProtocolError: ('Connection aborted.', timeout('The write operation timed out',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "pyptupMultiple2.py", line 93, in &amp;lt;module&amp;gt;
backup()
File "pyptupMultiple2.py", line 43, in backup
mode=WriteMode('overwrite'))
File "/home/sakib/.local/lib/python3.6/site-packages/dropbox/base.py", line 2207, in files_upload
f,
File "/home/sakib/.local/lib/python3.6/site-packages/dropbox/dropbox.py", line 274, in request
timeout=timeout)
File "/home/sakib/.local/lib/python3.6/site-packages/dropbox/dropbox.py", line 365, in request_json_string_with_retry
timeout=timeout)
File "/home/sakib/.local/lib/python3.6/site-packages/dropbox/dropbox.py", line 449, in request_json_string
timeout=timeout,
File "/home/sakib/.local/lib/python3.6/site-packages/requests/sessions.py", line 559, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/home/sakib/.local/lib/python3.6/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/home/sakib/.local/lib/python3.6/site-packages/requests/sessions.py", line 622, in send
r = adapter.send(request, **kwargs)
File "/home/sakib/.local/lib/python3.6/site-packages/requests/adapters.py", line 495, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', timeout('The write operation timed out',)&lt;/PRE&gt;&lt;P&gt;The Zip file is just 93 MB and so doesn't exceed the 150 MB limit. So what should I do here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm pretty much a noob programmer, and this is the first time I'm working with API, so any help is much much appreciated...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Sakib&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:10:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-while-uploading-a-zip-file-using-Python-script/m-p/293927#M17892</guid>
      <dc:creator>Apollonius</dc:creator>
      <dc:date>2019-05-29T09:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error while uploading a zip file using Python script</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-while-uploading-a-zip-file-using-Python-script/m-p/294061#M17906</link>
      <description>&lt;P&gt;Thanks for the report! This appears to be an issue when using the&amp;nbsp;Dropbox Python SDK with Python 3. We're looking into it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a workaround, please try setting an unlimited timeout when constructing your&amp;nbsp;Dropbox client, like this:&lt;/P&gt;
&lt;PRE&gt;dropbox.Dropbox(TOKEN, timeout=None)&lt;/PRE&gt;
&lt;P&gt;Please let me know if that does or doesn't help.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Aug 2018 15:26:47 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-while-uploading-a-zip-file-using-Python-script/m-p/294061#M17906</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-08-27T15:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Error while uploading a zip file using Python script</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-while-uploading-a-zip-file-using-Python-script/m-p/294109#M17913</link>
      <description>Thanks, that did the trick...&lt;BR /&gt;But my script took 7 mins and 1.372 seconds. I guess that's to be expected given that the zip file is around 90 MB and I have a 250 kilobyte per sec broadband connection...&lt;BR /&gt;I'm curious though, is it because of Python 3 that larger files get "timed out" errors by default and I have to erase that limit by using timeout=None?</description>
      <pubDate>Mon, 27 Aug 2018 18:10:49 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-while-uploading-a-zip-file-using-Python-script/m-p/294109#M17913</guid>
      <dc:creator>Apollonius</dc:creator>
      <dc:date>2018-08-27T18:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Error while uploading a zip file using Python script</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-while-uploading-a-zip-file-using-Python-script/m-p/294119#M17914</link>
      <description>Great, thanks for confirming that.&lt;BR /&gt;&lt;BR /&gt;Yes, between Python 2 and Python 3 there appears to be a change in behavior that results in this issue when using a non-None timeout. We're looking into it, but for now that workaround is required to avoid this issue.</description>
      <pubDate>Mon, 27 Aug 2018 19:07:21 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-while-uploading-a-zip-file-using-Python-script/m-p/294119#M17914</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-08-27T19:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error while uploading a zip file using Python script</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-while-uploading-a-zip-file-using-Python-script/m-p/295031#M17943</link>
      <description>&lt;P&gt;Got it!&lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@BEEAA17610EBE252DA0E57250B296A61/images/emoticons/1f642.png" alt=":slight_smile:" title=":slight_smile:" /&gt;&lt;BR /&gt;If you don't mind, is there any way so that I can know that this issue has been fixed so that I can update my code?&lt;/P&gt;</description>
      <pubDate>Sat, 01 Sep 2018 05:24:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-while-uploading-a-zip-file-using-Python-script/m-p/295031#M17943</guid>
      <dc:creator>Apollonius</dc:creator>
      <dc:date>2018-09-01T05:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error while uploading a zip file using Python script</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-while-uploading-a-zip-file-using-Python-script/m-p/295144#M17944</link>
      <description>&lt;P&gt;I'll be sure to follow up here once I have an update on this issue.&lt;/P&gt;</description>
      <pubDate>Sun, 02 Sep 2018 12:26:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Error-while-uploading-a-zip-file-using-Python-script/m-p/295144#M17944</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-09-02T12:26:40Z</dc:date>
    </item>
  </channel>
</rss>

