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

  • Home
  • SEARCH
  • 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 9141883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:42:15+00:00 2026-06-17T09:42:15+00:00

I downloaded Brive which downloads your Google Docs using the Drive API. I’m running

  • 0

I downloaded Brive which downloads your Google Docs using the Drive API. I’m running into issues with the filename not saving if it has slashes and crashes the application. How can I modify the model.py file to rewrite / as _?

model.py

brive.py

I think I just need to rewrite the “file_name” or “path” on line 74.

backend.py:

def save(self, user, document):
    self._mkdir(user.login)
    prefix = self._root_dir + user.login + os.sep
    for file_name, content in document.contents.items():
        path = prefix + file_name
        Log.debug(u'Writing {}\'s {} to {}'.format(
            user.login, document.title, path
        ))
        f = open(path, 'w')
        f.write(content)
        f.close()

This is the error:

[ 2013-01-17 T 06:17:08 Z ] Saving coral.lopez's doc "Lunchbox Monster High 4/7/12" (id: 1GyiuKFZeargO8KfzKS5H9V3PVbgTJufw2PwLaILzRVw)
[ 2013-01-17 T 06:17:08 Z ] Unexpected shutdown, deleting /home/davidneudorfer/google_docs_backup/2013-01-17T061021Z/ folder
### Unexpected error when saving coral.lopez's documents (doc id: 1GyiuKFZeargO8KfzKS5H9V3PVbgTJufw2PwLaILzRVw) ###
Traceback (most recent call last):
  File "brive.py", line 114, in <module>
    main()
  File "brive.py", line 92, in main
    user.save_documents(backend)
  File "/home/davidneudorfer/Brive/model.py", line 79, in save_documents
    self._save_single_document(backend, document)
  File "/home/davidneudorfer/Brive/model.py", line 105, in _save_single_document
    backend.save(self, document)
  File "/home/davidneudorfer/Brive/backend.py", line 78, in save
    f = open(path, 'w')
IOError: [Errno 2] No such file or directory: u'/home/davidneudorfer/google_docs_backup/2013-01-17T061021Z/coral.lopez/Lunchbox Monster High 4/7/12_1GyiuKFZeargO8KfzKS5H9V3PVbgTJufw2PwLaILzRVw.odt'
  • 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-06-17T09:42:15+00:00Added an answer on June 17, 2026 at 9:42 am

    You could use the_str.replace('/', '_') to turn the path with '/'s in it into one with '_' in it.

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

Sidebar

Related Questions

I downloaded a KML file and tried to load it into my project, which
I downloaded spring-framework-2.5.6.SEC01-with-dependencies.zip. There is the RequestMapping javadoc in spring-framework-2.5.6.SEC01\docs\api\org\springframework\web\bind\annotation\ But in the spring-framework-2.5.6.SEC01\dist\spring.jar
Downloaded Reachability from Apple, using this method to check for an active connection: -(BOOL)isReachable{
I downloaded the Facebook SDK for Android and I'm using it in my app
Just downloaded Quartz.Net, read the documentation which is out of date and have ended
I downloaded MxTerminator and followed these instructions . I unzipped it into a directory
I downloaded the necessary from http://code.google.com/p/delphichromiumembedded/ with TortoiseSVN, but I do not know how
I downloaded some files using wget and the files are in the following format:
I downloaded some sample code which includes a database query within the markup code.
I downloaded the VS2010 CTP from here: http://www.microsoft.com/downloads/details.aspx?FamilyId=922B4655-93D0-4476-BDA4-94CF5F8D4814&displaylang=en It took a while to download

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.