Import from "Dropbox/Camera Uploads" causes program crash
See original GitHub issuewhen Elodie is launched to import photos from ~/Dropbox/Camera Uploads folder, an exception is raised.
The command used is :
./elodie.py import "~/Dropbox/Camera Uploads" --destination ~/OrganizedLibrary
The output log is :
Traceback (most recent call last):
File "./elodie.py", line 302, in <module>
main()
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "./elodie.py", line 103, in _import
trash, allow_duplicates)
File "./elodie.py", line 59, in import_file
media, allowDuplicate=allow_duplicates, move=False)
File "/Users/pascalfosse/elodie/elodie/filesystem.py", line 208, in process_file
checksum_file
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 33: ordinal not in range(128)
Issue Analytics
- State:
- Created 7 years ago
- Comments:23 (20 by maintainers)
Top Results From Across the Web
Troubleshoot issues with camera uploads
If you're having issues with camera uploads, use this troubleshooting guide to solve many of the most common errors no matter what device...
Read more >Top 10 Solutions to Fix Dropbox Not Uploading Issue
Solution 1: Restart Dropbox or Your Computer Dropbox would fail to upload files because of a certain running program stalling. In this case,...
Read more >What to Do If Dropbox Keeps Crashing | FileWhopper Blog
One of the most common reasons why your Dropbox may be crashing is that it may be getting blocked by your anti-malware program....
Read more >Heavy uploading crashes Dropbox (Yes, I know this is r/ ...
When I try to upload semi-large video files to dropbox or google drive ... in here before or have any ideas of what...
Read more >Crashed on Dropbox import AND black screen export
2. From the logs, it looks like there's a particular file in Dropbox that is causing the crash. Not sure if possible but...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @ldexterldesign
I’m using a UTF-8 filesystem and I discovered that the space character in the names of the folders or the files can be encoded differently (different space characters). In fact, if try to use quotation or backslash, I often get a “file does not exist” error, depending on the kind of space character. To avoid such issue, I use now the autocompletion functionnality and I get this command:
./elodie.py import --source=~/Dropbox/Camera Uploads --destination=~/Google\ Drive/Google Photos
As you can see, two of these spaces looks like ascii spaces but they are not because if I type myself these spaces on the keyboard, I get a “file not found” exception (even with backslash or quotation). The command line above contains UTF-8 characters and causes an error in execution of Elodie:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 38: ordinal not in range(128)
That’s why I suggested to use
.decode(sys.getfilesystemencoding())
on the strings “source” and “destination” to avoid such error. However, we cannot reproduce the error with a TestCase and we need some help for that.@jmathai I’ve pulled the latest from the master, and the problem is solved for me. Thanks.
Just saw that. The error should be in the file name. Do you know which files might have non ascii characters in them?