Giter Club home page Giter Club logo

Comments (5)

devsnd avatar devsnd commented on May 23, 2024

Hello @ktkchn,

thanks for reporting! Can you please upload the mp4 file somewhere so i can reproduce the bug? thanks!

from tinytag.

ktkchn avatar ktkchn commented on May 23, 2024

hello @devsnd

I have uploaded the m4a file here
https://drive.google.com/file/d/0B4rXGVsThTq6UjBEcjZCX29aWFU/view?usp=sharing

thanks

complete error traceback:

Traceback (most recent call last):
File "makedb.py", line 39, in
tag=TinyTag.get(fp)
File "/usr/lib/python2.6/site-packages/tinytag/tinytag.py", line 99, in get
tag.load(tags=tags, duration=duration, image=image)
File "/usr/lib/python2.6/site-packages/tinytag/tinytag.py", line 116, in load
self._parse_tag(self._filehandler)
File "/usr/lib/python2.6/site-packages/tinytag/tinytag.py", line 307, in _parse_tag
return self._traverse_atoms(fh, path=self.META_DATA_TREE)
File "/usr/lib/python2.6/site-packages/tinytag/tinytag.py", line 331, in _traverse_atoms
curr_path=curr_path + [atom_type])
File "/usr/lib/python2.6/site-packages/tinytag/tinytag.py", line 331, in _traverse_atoms
curr_path=curr_path + [atom_type])
File "/usr/lib/python2.6/site-packages/tinytag/tinytag.py", line 331, in _traverse_atoms
curr_path=curr_path + [atom_type])
File "/usr/lib/python2.6/site-packages/tinytag/tinytag.py", line 331, in _traverse_atoms
curr_path=curr_path + [atom_type])
File "/usr/lib/python2.6/site-packages/tinytag/tinytag.py", line 331, in _traverse_atoms
curr_path=curr_path + [atom_type])
File "/usr/lib/python2.6/site-packages/tinytag/tinytag.py", line 334, in _traverse_atoms
for fieldname, value in sub_path(fh.read(atom_size)).items():
File "/usr/lib/python2.6/site-packages/tinytag/tinytag.py", line 211, in parse_data_atom
return {fieldname: conversion(data_atom[8:])}
File "/usr/lib/python2.6/site-packages/tinytag/tinytag.py", line 180, in
1: lambda x: codecs.decode(x, 'utf-8'), # UTF-8
File "/usr/lib64/python2.6/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x92 in position 34: invalid start byte

from tinytag.

devsnd avatar devsnd commented on May 23, 2024

Hey @ktkchn,

I have reproduced the bug and also found out why TinyTag crashes; The file you provided is malformed and does not adhere to the spec. Apples specification for MP4 allows strings only to be encoded using UTF-8. The file you provided seems to use ISO-8859-1 (also called latin1). Since there is no way to find out which encoding a byte-sequence was encoded in, I cannot just decode your file in a different manner.

I have added a patch that will replace all characters that cannot be decoded with , so that TinyTag will not crash anymore.

from tinytag.

devsnd avatar devsnd commented on May 23, 2024

I have released a new version 0.15.2 that includes this fix.

from tinytag.

ktkchn avatar ktkchn commented on May 23, 2024

thank you!

from tinytag.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.