question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crashed after auth?

See original GitHub issue

I did

./download_photos.py /Volumes/SAMSUNG\ USB/Photos \
    --username=MyEmail@gmail.com \
    --password=MyAwesomePassword \
    --size=original
Please choose an option: [0]: 1
Please enter two-factor authentication code: 883838
Great, you're all set up. The script can now be run without user interaction.
You can also set up email notifications for when the two-step authentication expires.
(Use --help to view information about SMTP options.)
Looking up all photos and videos...
Downloading 3345 original photos and videos to /Volumes/SAMSUNG USB/Photos/ ...
Downloading /Volumes/SAMSUNG USB/Photos/2014/12/29/IMG_0927-original.MOV-originaDownloading /Volumes/SAMSUNG USB/Photos/2015/01/23/IMG_9797-original.jpeg:   0%| | 2/3345 [00:04<2:36:54,  2.82s/it]            Traceback (most recent call last):
  File "./download_photos.py", line 323, in <module>
    download()
  File "/Library/Python/2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Library/Python/2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Python/2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "./download_photos.py", line 177, in download
    download_dir, progress_bar, only_print_filenames)
  File "./download_photos.py", line 259, in download_photo
    if size not in photo.versions and not force_size and size != 'original':
  File "/Library/Python/2.7/site-packages/pyicloud/services/photos.py", line 490, in versions
    if self.item_type == "movie":
  File "/Library/Python/2.7/site-packages/pyicloud/services/photos.py", line 484, in item_type
    self._master_record['fields']['itemType']['value']])
KeyError: u'public.png'

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
ndbroadbentcommented, Jul 22, 2018

Hi @invious, sorry about that! I’ve just fixed the crash in my fork of the pyicloud library, so please run git pull, then sudo pip install -r requirements.txt to install the fixed version.

@bexelbie Hey, it looks like there’s a few missing cases in #68. I’ve added ‘public.png’ to my fork of pyicloud, but I’m also going to check for the key in self.ITEM_TYPES, fall back to the filename extension, and then default to movie:

    @property
    def item_type(self):
        item_type = self._master_record['fields']['itemType']['value']
        if item_type in self.ITEM_TYPES:
            return self.ITEM_TYPES[item_type]
        if self.filename.lower().endswith(('.heic', '.png', '.jpg', '.jpeg')):
            return 'image'
        return 'movie'

If that looks good to you, you might want to update your pyicloud PR with that code: https://github.com/ndbroadbent/pyicloud/commit/b65053d7691f2dc435e5a79842fe0c73fc2f249f

0reactions
inviouscommented, Jul 22, 2018

Hey sorry, I have no idea what happened but found it again in preferences and healed it and it’s all good

Read more comments on GitHub >

github_iconTop Results From Across the Web

On some Android devices, the application crashes after ...
Issue On some Android devices, the application crashes after passing the authentication procedure. Works correctly on most devices.
Read more >
App crashes upon phone authentication after changing ...
I don't know why, while phone authentication, I get below error and app get crashed. Build in function FirebaseAuth.instance.
Read more >
Game crashes after pussle authentication : r/IntegralFactor
11 votes, 11 comments. Just reinstalled after a long time, and like the title says it just crashes on authentication every single time....
Read more >
Battle.net app games crash on authentication - Blizzard Forums
Hello I'm having an issue with SC2 crashing at authentication for the US ... after disabling one drive to clear the bad variables...
Read more >
Authentication and Binding issues with Primary Domain ...
Authentication and Binding issues with Primary Domain Controller after Crash. We have a domain with two Domain Controllers on Windows Server ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found