Comments (9)
Can you provide any additional information about what caused the error? Putting a try/except around this code is probably not the best way to address this issue, so I would need to reproduce the issue to find the source of the problem.
from dropbox-restore.
I am also having this problem, Im running this in lubuntu, with version python 2.7.4,
do I do it like this?:
try:
if item.get('is_dir', False):
restore_folder(client, item['path'], cutoff_datetime, verbose)
else:
restore_file(client, item['path'], cutoff_datetime,
item.get('is_deleted', False), verbose)
time.sleep(DELAY)
else:
how can I fix it? it seems like its not able to find any files
from dropbox-restore.
I was hoping to have some spare time to spend on this and getting into github bit it seems this is not to be, at least for now.
https://dl.dropboxusercontent.com/u/1630910/restore.py
This is a slightly modified version with the try/except block in place. As noted by clark, this is a horrible hack. Also NB, there are no app keys in this file!
I should also point out that when I ran into this problem it only affected maybe 20 out of 90,000+ files. Certainly not everything in dropbox!
I'll also just mention that I actually ended up modifying that try/except to catch all errors as I ran into a couple of files (that I didn't need) that had non ascii characters in their names which produced another error.
Sorry about all the hacks but I was helping someone recover from one of those ransomware viruses and time was of the essence. Also now they are recovered I don't have access to the dropbox account that produced these errors so there isn't much more I can do to help.
from dropbox-restore.
Thanks. Im going to try them this evening. Do you know of a way to try this on windows? This is my current situation:
A lot of files were deleted in dropbox/stuff/ 2 months ago. This is a windows os.
Since the commands were written for linux, i am running a lubutu os in virtualbox and downloaded dropbox on lubuntu with the same account. It is now synced to the current windows dropbox folder.
Then i open terminal and cd my way to restore script and i type the python commad provided on the first page.
Ive only tried 2 folders (i dont want to mess everything up)
With parameter /a \for dropbox folder dropbox/a/
and it returns
:restoring a
Error 404 i forgot the rest of the message
am i doing everything correct on my end? Ive only dealt with linux os for a month.
Thanks for your time!
from dropbox-restore.
I tried your version, but I am still getting this error:
user@user-VirtualBox:/media/sf_a$ python2.7 restore.py /hi 2014-06-09
Restoring folder: /hi
[404] u"Path '/hi' not found"
Note: You must specify the path starting with "/", where "/" is the root
of your dropbox folder. So if your dropbox directory is at "/home/user/dropbox"
and you want to restore "/home/user/dropbox/folder", the ROOTPATH is "/folder".
from dropbox-restore.
I am getting the same error. No solution?
from dropbox-restore.
I can't reproduce this, so there's no way to debug it. Please provide as much information as you can so that someone can figure it out at some point.
from dropbox-restore.
I ran into this with a shared folder, idk if that helps.
Here was the stack
Traceback (most recent call last):
File "restore.py", line 103, in <module>
main()
File "restore.py", line 99, in main
restore_folder(client, root_path, cutoff_datetime, verbose=True)
File "restore.py", line 84, in restore_folder
restore_folder(client, item['path'], cutoff_datetime, verbose)
File "restore.py", line 84, in restore_folder
restore_folder(client, item['path'], cutoff_datetime, verbose)
File "restore.py", line 87, in restore_folder
item.get('is_deleted', False), verbose)
File "restore.py", line 47, in restore_file
revisions = client.revisions(path.encode('utf8'))
File "/Library/Python/2.7/site-packages/dropbox/client.py", line 1041, in revisions
return self.rest_client.GET(url, headers)
File "/Library/Python/2.7/site-packages/dropbox/rest.py", line 311, in GET
return cls.IMPL.GET(*n, **kw)
File "/Library/Python/2.7/site-packages/dropbox/rest.py", line 246, in GET
return self.request("GET", url, headers=headers, raw_response=raw_response)
File "/Library/Python/2.7/site-packages/dropbox/rest.py", line 227, in request
raise ErrorResponse(r, r.read())
dropbox.rest.ErrorResponse: [404] u"Path '/some/shared/folder/file.jpg' not found"
Also the file was super old, but it had just barely been added to my dropbox today. Maybe revision history works different for shared folders or something?
Thanks so much for this script!
from dropbox-restore.
this is my experience:
-- if you have free dropbox account insert into restore.py line 104 "cutoff_datetime).days >= 30", if you have pro dropbox account insert "cutoff_datetime).days >= 365"
-- if you get error - script stops with a 404 dropbox rest error on some files like dropbox.rest.ErrorResponse: [404] u"Path '/some/shared/folder/file.jpg' not found" REPEAT COMMAND FOR SAME DIRECTORY python2.7 restore.py /folder/../ 2016-06-25
Many times script goes through, seems Dropbox or our server has capacity problems!!!!
- I got error many times as: ..."Path '/hi 2' not found" Note: You must specify the path starting with "/", where "/" is the root of your dropbox folder. So if your dropbox directory is at "/home/user/dropbox" and you want to restore "/home/user/dropbox/folder", the ROOTPATH is "/folder".
I help myself to define names as they have blank space so I insert into command
python2.7 restore.py /folder/My Documents/ 2016-06-25
blank space linux command:
python2.7 restore.py /folder/"My Documents"/ 2016-06-25
so you can solve blank spaces with "Folder name"
-- i run restore 2 times by folder for sure.
APPENDIX: If you need help contact me over http://marcelino.si because many newcomer havent root server access.
Have a nice day, bye
from dropbox-restore.
Related Issues (20)
- Accidentally unlinked HistoryRestore application HOT 2
- Error on first run HOT 1
- App not putting me through the OAuth 2 authorization flow again HOT 2
- Files outside the retention window are deleted locally HOT 3
- Dropbox refuses more API calls HOT 1
- when going to the authorization screen I get the following error: HOT 1
- Invalid future date check HOT 1
- the app can't accept more users HOT 1
- ImportError: No module named dropbox HOT 2
- 'can't accept more users' error HOT 1
- App in development mode HOT 4
- Internal Server Error (500 & 503) HOT 3
- Can't restore folders with extended characters (éàöè...) HOT 3
- New Dropbox API HOT 3
- Performance improvement for cherry-picking HOT 2
- Restoring folders doesn't preserve case HOT 1
- Restore files in Root Folder HOT 1
- Restoration ran well but I cannot find my restored files & folders HOT 1
- 'module' object has no attribute 'client' HOT 3
- Getting a List Revision Error HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dropbox-restore.