Coder Social home page Coder Social logo

Handle Backslash about dropbox-restore HOT 8 CLOSED

clark800 avatar clark800 commented on June 23, 2024
Handle Backslash

from dropbox-restore.

Comments (8)

clark800 avatar clark800 commented on June 23, 2024

It is just a string, so it should work fine with unix-style forward slashes. You may have to use quotes on the command line.

from dropbox-restore.

AgostinoSturaro avatar AgostinoSturaro commented on June 23, 2024

Here's my try, with little edits to mask the real path names

C:\Users\User123\Dropbox>python restore.py "C:/Users/User123/Dropbox/Materiale
WXYZ/asdasd asdasdas/3° Anno/Gestione Imprese" 2013-07-24
Restoring folder: C:/Users/User123/Dropbox/Materiale WXYZ/asdasd asdasdas/3¦ A
nno/Gestione Imprese
Traceback (most recent call last):
File "restore.py", line 78, in
main()
File "restore.py", line 74, in main
restore_folder(client, root_path, cutoff_datetime, verbose=True)
File "restore.py", line 59, in restore_folder
folder = client.metadata(path, list=True, include_deleted=True)
File "C:\Python27\lib\site-packages\dropbox\client.py", line 730, in metadata
return self.rest_client.GET(url, headers)
File "C:\Python27\lib\site-packages\dropbox\rest.py", line 254, in GET
return cls.IMPL.GET(_n, *_kw)
File "C:\Python27\lib\site-packages\dropbox\rest.py", line 198, in GET
return self.request("GET", url, headers=headers, raw_response=raw_response)
File "C:\Python27\lib\site-packages\dropbox\rest.py", line 182, in request
raise ErrorResponse(r)
dropbox.rest.ErrorResponse: [404] u"Path '/C:/Users/User123/Dropbox/Materiale W
XYZ/asdasd asdasdas/3\ufffd Anno/Gestione Imprese' not found"

from dropbox-restore.

clark800 avatar clark800 commented on June 23, 2024

The path is supposed to be the dropbox path, not the local filesystem path. "/photos" is the path for the "photos" folder inside the dropbox folder.

from dropbox-restore.

AgostinoSturaro avatar AgostinoSturaro commented on June 23, 2024

I tried again, using
Materiale WXYZ/asdasd asdasdas/3\ufffd Anno/Gestione Imprese
but I got the same error.

I also tried
/Materiale WXYZ/asdasd asdasdas/3\ufffd Anno/Gestione Imprese
to no avail. Any idea?

Maybe it's the ° that's giving problems...

from dropbox-restore.

clark800 avatar clark800 commented on June 23, 2024

Looks like you have unicode characters in the directory name. I'm not sure if that will work. Sorry, I don't have time to work on this now.

from dropbox-restore.

AgostinoSturaro avatar AgostinoSturaro commented on June 23, 2024

Yup, will using linux help with that, or is this a Python 2.7 problem?

from dropbox-restore.

clark800 avatar clark800 commented on June 23, 2024

It is probably due to python 2.7. I changed a couple of things to make the code compatible with python3 since python3 does everything in unicode. Try running it with python3 and let me know if it works.

from dropbox-restore.

AgostinoSturaro avatar AgostinoSturaro commented on June 23, 2024

Sorry, I could not test this because this installer doesn't seem to recognize my Python 3.3.2 installation
setuptools-0.9.8.win-amd64-py3.2.‌exe
Says "Python version 3.2 required, which was not found in the registry."

I asked the author and I'm waiting. Any idea?

from dropbox-restore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.