Skip to content

ID3Tag::Frames::V2::TextFrame::UnsupportedTextEncoding #160

Closed
@fabioperrella

Description

@fabioperrella

When an mp3 file has a tag with unsupported text encoding (e.g.: artist), it raises an error as follows:

$ exe/format_parser_inspect file.mp3
Traceback (most recent call last):
	33: from exe/format_parser_inspect:22:in `<main>'
	32: from exe/format_parser_inspect:22:in `map'
	31: from exe/format_parser_inspect:24:in `block in <main>'
	30: from exe/format_parser_inspect:24:in `public_send'
	29: from /Users/fabioperrella/projects/format_parser/lib/format_parser.rb:104:in `parse_file_at'
	28: from /Users/fabioperrella/projects/format_parser/lib/format_parser.rb:104:in `open'
	27: from /Users/fabioperrella/projects/format_parser/lib/format_parser.rb:105:in `block in parse_file_at'
	26: from /Users/fabioperrella/projects/format_parser/lib/format_parser.rb:173:in `parse'
	25: from /Users/fabioperrella/projects/format_parser/lib/format_parser.rb:173:in `to_a'
	24: from /Users/fabioperrella/projects/format_parser/lib/format_parser.rb:173:in `each'
	23: from /Users/fabioperrella/projects/format_parser/lib/format_parser.rb:173:in `each'
	22: from /Users/fabioperrella/projects/format_parser/lib/format_parser.rb:173:in `each'
	21: from /Users/fabioperrella/projects/format_parser/lib/format_parser.rb:173:in `each'
	20: from /Users/fabioperrella/projects/format_parser/lib/format_parser.rb:169:in `block in parse'
	19: from /Users/fabioperrella/projects/format_parser/lib/format_parser.rb:201:in `execute_parser_and_capture_expected_exceptions'
	18: from /Users/fabioperrella/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/measurometer-1.1.1/lib/measurometer.rb:48:in `instrument'
	17: from /Users/fabioperrella/projects/format_parser/lib/format_parser.rb:202:in `block in execute_parser_and_capture_expected_exceptions'
	16: from /Users/fabioperrella/projects/format_parser/lib/parsers/mp3_parser.rb:84:in `call'
	15: from /Users/fabioperrella/projects/format_parser/lib/parsers/mp3_parser.rb:281:in `blend_id3_tags_into_hash'
	14: from /Users/fabioperrella/projects/format_parser/lib/parsers/mp3_parser.rb:281:in `each_with_object'
	13: from /Users/fabioperrella/projects/format_parser/lib/parsers/mp3_parser.rb:281:in `each'
	12: from /Users/fabioperrella/projects/format_parser/lib/parsers/mp3_parser.rb:282:in `block in blend_id3_tags_into_hash'
	11: from /Users/fabioperrella/projects/format_parser/lib/parsers/mp3_parser.rb:45:in `to_h'
	10: from /Users/fabioperrella/projects/format_parser/lib/parsers/mp3_parser.rb:45:in `each_with_object'
	 9: from /Users/fabioperrella/projects/format_parser/lib/parsers/mp3_parser.rb:45:in `each'
	 8: from /Users/fabioperrella/projects/format_parser/lib/parsers/mp3_parser.rb:46:in `block in to_h'
	 7: from /Users/fabioperrella/projects/format_parser/lib/parsers/mp3_parser.rb:46:in `public_send'
	 6: from /Users/fabioperrella/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/id3tag-0.12.1/lib/id3tag/tag.rb:19:in `block (2 levels) in <class:Tag>'
	 5: from /Users/fabioperrella/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/id3tag-0.12.1/lib/id3tag/tag.rb:25:in `content_of_first_frame'
	 4: from /Users/fabioperrella/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/id3tag-0.12.1/lib/id3tag/frames/v2/text_frame.rb:14:in `content'
	 3: from /Users/fabioperrella/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/id3tag-0.12.1/lib/id3tag/frames/v2/text_frame.rb:24:in `encoded_content'
	 2: from /Users/fabioperrella/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/id3tag-0.12.1/lib/id3tag/frames/v2/text_frame.rb:28:in `source_encoding'
	 1: from /Users/fabioperrella/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/id3tag-0.12.1/lib/id3tag/frames/v2/text_frame.rb:28:in `fetch'
/Users/fabioperrella/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/id3tag-0.12.1/lib/id3tag/frames/v2/text_frame.rb:28:in `block in source_encoding': ID3Tag::Frames::V2::TextFrame::UnsupportedTextEncoding (ID3Tag::Frames::V2::TextFrame::UnsupportedTextEncoding)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions