How to use the tinytag.TinyTagException function in tinytag

To help you get started, we’ve selected a few tinytag examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github devsnd / tinytag / tinytag / View on Github external

    tag = TinyTag.get(filename, image=save_image_path is not None)
    if save_image_path:
        image = tag.get_image()
        if image:
            with open(save_image_path, 'wb') as fh:
    if formatting == 'json':
    elif formatting == 'csv':
        print('\n'.join('%s,%s' % (k, v) for k, v in tag.as_dict().items()))
    elif formatting == 'tsv':
        print('\n'.join('%s\t%s' % (k, v) for k, v in tag.as_dict().items()))
except TinyTagException as e:
github irmen / synthesizer / examples / jukebox / View on Github external
def get_tag(self, filename):
            return tinytag.TinyTag.get(filename)
        except tinytag.TinyTagException as x:
            print("Tag error:", x)
            print("Occurred when processing file: ", filename.location.encode("ascii", errors="replace"))
            return tinytag.TinyTag.get(filename, duration=False)