Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elodie hangs with 'float' object has no attribute ’strip’ randomly - macOS #413

Closed
jr-b opened this issue Feb 11, 2022 · 3 comments
Closed

Comments

@jr-b
Copy link

jr-b commented Feb 11, 2022

Hey, I'm giving Elodie a try today and I'm getting this error randomly every time I run it on my pictures folder.

Here's my setup:
macOS 12.2.1, Macbook Pro M1

python -V
Python 3.9.10
cat ~/.elodie/config.ini
[MapQuest]
key="shP******8m"
prefer_english_names=True

I'm using the following command:
./elodie.py import --debug --destination="~/Pictures" ~/Downloads/Pictures

I get this error randomly, it stops after different pictures every time:

Original checksum returned None for /Users/jrb/Downloads/Pictures/backup-photos-iphone/2016-01-17_11.43.02.jpg. Skipping...
/Users/jrb/Downloads/Pictures/jrb’s iPhone/photos-suisse-backup/jrb/IMG_0359 1.JPG already at /Users/jrb/Pictures/2019-01-Jan/Unknown Location/2019-01-31_19-45-06-img_0359.jpg.
Original checksum returned None for /Users/jrb/Downloads/Pictures/jrb’s iPhone/photos-suisse-backup/jrb/IMG_0359 1.JPG. Skipping...
/Users/jrb/Downloads/Pictures/backup-photos-iphone/2018-04-26_00.35.11.jpg already at /Users/jrb/Pictures/2018-04-Apr/Unknown Location/2018-04-26_04-35-11-2018-04-26_00.35.11.jpg.
Original checksum returned None for /Users/jrb/Downloads/Pictures/backup-photos-iphone/2018-04-26_00.35.11.jpg. Skipping...
/Users/jrb/Downloads/Pictures/backup-photos-iphone/2016-08-10_15.35.45.jpg already at /Users/jrb/Pictures/2016-08-Aug/Unknown Location/2016-08-10_19-35-45-2016-08-10_15.35.45.jpg.
Original checksum returned None for /Users/jrb/Downloads/Pictures/backup-photos-iphone/2016-08-10_15.35.45.jpg. Skipping...
/Users/jrb/Downloads/Pictures/backup-photos-iphone/2017-02-28_10.11.42.jpg already at /Users/jrb/Pictures/2017-02-Feb/Unknown Location/2017-02-28_15-11-42-2017-02-28_10.11.42.jpg.
Original checksum returned None for /Users/jrb/Downloads/Pictures/backup-photos-iphone/2017-02-28_10.11.42.jpg. Skipping...
/Users/jrb/Downloads/Pictures/iphone6-dernier-backup/jrb’s iPhone/IMG_0097.JPG already at /Users/jrb/Pictures/2018-09-Sep/Unknown Location/2018-09-03_20-52-04-img_0097.jpg.
Original checksum returned None for /Users/jrb/Downloads/Pictures/iphone6-dernier-backup/jrb’s iPhone/IMG_0097.JPG. Skipping...
/Users/jrb/Downloads/Pictures/backup-photos-iphone/IMG_1325-2018-12-10.PNG already at /Users/jrb/Pictures/2016-09-Sep/Unknown Location/2016-09-07_04-00-55-img_1325-2018-12-10.png.
Original checksum returned None for /Users/jrb/Downloads/Pictures/backup-photos-iphone/IMG_1325-2018-12-10.PNG. Skipping...
/Users/jrb/Downloads/Pictures/backup-photos-iphone/IMG_2279-2018-12-10.PNG already at /Users/jrb/Pictures/2017-08-Aug/Unknown Location/2017-08-18_23-30-55-img_2279-2018-12-10.png.
Original checksum returned None for /Users/jrb/Downloads/Pictures/backup-photos-iphone/IMG_2279-2018-12-10.PNG. Skipping...
/Users/jrb/Downloads/Pictures/jrb’s iPhone/photos-suisse-backup/jrb/WJAU2737.MP4 already at /Users/jrb/Pictures/2019-02-Feb/Unknown Location/2019-02-12_22-14-30-wjau2737.mp4.
Original checksum returned None for /Users/jrb/Downloads/Pictures/jrb’s iPhone/photos-suisse-backup/jrb/WJAU2737.MP4. Skipping...
/Users/jrb/Downloads/Pictures/backup-photos-iphone/2018-04-30_12.20.54.jpg already at /Users/jrb/Pictures/2018-04-Apr/Unknown Location/2018-04-30_16-20-54-2018-04-30_12.20.54.jpg.
Original checksum returned None for /Users/jrb/Downloads/Pictures/backup-photos-iphone/2018-04-30_12.20.54.jpg. Skipping...
/Users/jrb/Downloads/Pictures/backup-photos-iphone/IMG_0033.HEIC already at /Users/jrb/Pictures/2017-10-Oct/Unknown Location/2017-10-27_01-44-22-70cd5882-42a5-46b3-9c35-2644b5c6613a.heic.
Original checksum returned None for /Users/jrb/Downloads/Pictures/backup-photos-iphone/IMG_0033.HEIC. Skipping...
Traceback (most recent call last):
  File "/Users/jrb/Documents/elodie/./elodie.py", line 378, in <module>
    main()
  File "/Users/jrb/.pyenv/versions/3.9.10/lib/python3.9/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/Users/jrb/.pyenv/versions/3.9.10/lib/python3.9/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/Users/jrb/.pyenv/versions/3.9.10/lib/python3.9/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/jrb/.pyenv/versions/3.9.10/lib/python3.9/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/jrb/.pyenv/versions/3.9.10/lib/python3.9/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/Users/jrb/Documents/elodie/./elodie.py", line 140, in _import
    dest_path = import_file(current_file, destination, album_from_folder,
  File "/Users/jrb/Documents/elodie/./elodie.py", line 67, in import_file
    dest_path = FILESYSTEM.process_file(_file, destination,
  File "/Users/jrb/Documents/elodie/elodie/filesystem.py", line 545, in process_file
    file_name = self.get_file_name(metadata)
  File "/Users/jrb/Documents/elodie/elodie/filesystem.py", line 173, in get_file_name
    this_value = re.sub(self.whitespace_regex, '-', metadata[part].strip())
AttributeError: 'float' object has no attribute 'strip'
@jmathai
Copy link
Owner

jmathai commented Feb 11, 2022

Can you update this line of code?

this_value = re.sub(self.whitespace_regex, '-', str(metadata[part]).strip())

@jr-b
Copy link
Author

jr-b commented Feb 11, 2022

Thank you very much, that fixed the problem I had.

@jr-b jr-b closed this as completed Feb 11, 2022
@jmathai
Copy link
Owner

jmathai commented Feb 11, 2022

Great to hear :). Reopening until we can have it fixed via a pull requests - feel free to submit :)

@jmathai jmathai reopened this Feb 11, 2022
@jr-b jr-b closed this as not planned Won't fix, can't repro, duplicate, stale May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants