0

Iam building a UI using mplayer_python.

When I try to get the metadata, sometimes the following error happens

title = metadata.get ('Title','' )

-> AttributeError: 'NoneType' has no attribute 'get'

is there any way to check if the operation is valid

like

if SOMETHING : title = metadata.get ('Title','' )

??

Iam new to python so any help would be appreciated

Thanks in advance

0

1 Answer 1

2

This means that metadata is None. You can use if metadata.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.