Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Install Synchronator
-
I tried deleting Synchronator and starting all over again on the iPhone following the directions above. Synchronator starts and begins Updating from Dropbox, downloads a dozen files and then the script dies. The traceback is as follows:
Traceback (most recent call last):
File "/private/var/mobile/Containers/Shared/AppGroup/A7D4C56F-A77A-4D88-87AC-A52286C0CF04/Pythonista3/Documents/Synchronator/Synchronator.py", line 403, in <module>
check_remote(dbx, state)
File "/private/var/mobile/Containers/Shared/AppGroup/A7D4C56F-A77A-4D88-87AC-A52286C0CF04/Pythonista3/Documents/Synchronator/Synchronator.py", line 282, in check_remote
state.execute_delta(dbx)
File "/private/var/mobile/Containers/Shared/AppGroup/A7D4C56F-A77A-4D88-87AC-A52286C0CF04/Pythonista3/Documents/Synchronator/Synchronator.py", line 152, in execute_delta
self.__process_remote_entries(results.entries, current_remote_file_paths)
File "/private/var/mobile/Containers/Shared/AppGroup/A7D4C56F-A77A-4D88-87AC-A52286C0CF04/Pythonista3/Documents/Synchronator/Synchronator.py", line 242, in __process_remote_entries
self.download_remote(dbx, entry_path, '-- Not Found Locally')
File "/private/var/mobile/Containers/Shared/AppGroup/A7D4C56F-A77A-4D88-87AC-A52286C0CF04/Pythonista3/Documents/Synchronator/Synchronator.py", line 139, in download_remote
result = dbx.files_download_to_file(path, os.path.join('/', path))
File "/private/var/mobile/Containers/Shared/AppGroup/A7D4C56F-A77A-4D88-87AC-A52286C0CF04/Pythonista3/Documents/site-packages/dropbox/base.py", line 1175, in files_download_to_file
None,
File "/private/var/mobile/Containers/Shared/AppGroup/A7D4C56F-A77A-4D88-87AC-A52286C0CF04/Pythonista3/Documents/site-packages/dropbox/dropbox.py", line 296, in request
user_message_locale)
dropbox.exceptions.ApiError: ApiError('da9c4c00582c7cfa99818f98393be092', DownloadError('path', LookupError('not_found', None)))I would really like to get this working (reliably) on the iPad and iPhone. Can someone please help?
-
Can anyone please tell me what the problem is here or suggest how I can debug it? Synchronator (v1.11) gets to this point after downloading some files and then fails with the api error.
-
Looks like she synchronator is trying to download a file that doesn't exist in Dropbox. Why not fire up
import pdb
pdb.pm()And figure out which file it is trying to download..
Alternatively it might be saying that your destination path doesn't exist - you'd have to look at the code to see specifically what the issue is
-
Seems
path
needs to be the full remote Dropbox path. Maybe synchronator needs to know how you have your Dropbox folders set up .. -
pdb.pm() shows:
pdb.pm()
/private/var/mobile/Containers/Shared/AppGroup/A7D4C56F-A77A-4D88-87AC-A52286C0CF04/Pythonista3/Documents/site-packages/dropbox/dropbox.py(296)request()
-> user_message_locale)
(Pdb)I thought it was possible for me to sync my iPhone and iPad to the same Dropbox directory so that any changes to one would be reflected in changes to the other but perhaps I can't do that?
-
pdb lets you enter a debugging state, that lets you walk up the stack frame, interrogating variables, etc.
for instance here i would be interested in you pressin
u
a few times until you are at line 242 in Synchronator:self.download_remote(dbx, entry_path, '-- Not Found Locally')
then typing
print(entry_path)
(press q to exit pdb)
Alternatively, add a print(entry_path) before that line, and then we can see which(if any) files succeed, and which one failed, then figure out which one failed.
if you are saying it works for a while, then craps out, it may be you are violating a dropbox rate api, and need to add some time.sleep's between each file.
-
I did what you said and the Print(entry_path) shows Examples/Calculator.py/Calculator.py
AFAICT that file is not on the iPhone nor is it in the Dropbox backup.
I can replace everything on the iPhone with the Dropbox backup (which is from the iPad) but I don't know of an option in Synchronator to do that.
-
hmm. you could just try/except around the line throwing the failure you are getting, so at least the valid files get restored.
Do you have an Examples/Calculator.py?
-
Oddly ther is a directory with that name but it is empty. I tried putting a copy of Calculator.py in there and I get the same error from Synchronator for the same file. ??
-
@ihf If you have to many issues with getting dropbox to run, you can also use the
mc
andmount
commands in StaSh with py2, which support dropbox. For help, seeman mounting
.