Skip to content

Unexpected int returned instead of string from metadata[part] in filesystem.py #454

Open
@muxketeer

Description

@muxketeer

On select images receiving this error:

  main()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call_
  return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
  rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
  return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
  return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
  return callback(*args, **kwargs)
File "./elodie.py", line 141, in _import
  trash, allow_duplicates)
File "./elodie.py", line 68, in import_file
  media, allowDuplicate=allow_duplicates, move=False)
File "/opt/elodie/elodie/filesystem.py", line 545, in process_file
  file_name = self.get_file_name(metadata)
File "/opt/elodie/elodie/filesystem.py", line 173, in get_file_name
  this_value = re.sub(self.whitespace_regex, '-', metadata[part].strip())
tributeError: 'int' object has no attribute 'strip'

Further debugging indicates that is it is due to the value of metadata[part] returning an integer, such as 106499463. Where this field typically, with other images, returns something like: jpg or mov etc..

Possibly related to #400

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions