Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6149321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:25:58+00:00 2026-05-23T19:25:58+00:00

I’m trying to upload a backup file from my server to my Google storage

  • 0

I’m trying to upload a backup file from my server to my Google storage in a Python script. The backup file is an encrypted zip file (gpg file). It connects successfully, but fails transferring the file which the following error:

Traceback (most recent call last):
  File "backup.py", line 37, in <module>
    entry = gd_client.Upload(ms, 'Backup.gpg', folder_or_uri=uri)
  File "/usr/local/lib/python2.6/dist-packages/gdata/docs/service.py", line 306, in Upload
    folder_or_uri)
  File "/usr/local/lib/python2.6/dist-packages/gdata/docs/service.py", line 161, in _UploadFile
    converter=gdata.docs.DocumentListEntryFromString)
  File "/usr/local/lib/python2.6/dist-packages/gdata/service.py", line 1236, in Post
    media_source=media_source, converter=converter)
  File "/usr/local/lib/python2.6/dist-packages/gdata/service.py", line 1358, in PostOrPut
    'reason': server_response.reason, 'body': result_body}
gdata.service.RequestError: {'status': 400, 'body': 'Invalid request URI', 'reason': 'Bad Request'}

Here is my code:

import os
import sys
import gdata.docs
import gdata.docs.service
import gdata.docs.client

gd_client = gdata.docs.service.DocsService()
gd_client.ClientLogin('me@myemail.com', 'mypassword')

uri = '%s?convert=false' % gdata.docs.client.DOCLIST_FEED_URI

f = open('backup.zip.gpg')
ms = gdata.MediaSource(file_handle=f, content_type='application/octet-stream', content_length=os.path.getsize(f.name))
entry = gd_client.Upload(ms, 'Backup.gpg', folder_or_uri=uri)

It’s possible that the file is just too big (56mb), and I can’t use Google Docs storage this way. I’d hope for a more explicit error message if this was the case though. I’m wondering if it’s a problem with my saying ‘convert=false’. It’s a Google Apps account that I’m using.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:25:59+00:00Added an answer on May 23, 2026 at 7:25 pm

    Uploading files of any type are only allowed for Google Apps for Business accounts. A regular account cannot upload this filetype. See this link from the Google Docs API.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to render a haml file in a javascript response like so:
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I am currently running into a problem where an element is coming back from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.