Skip to content

When using the dialogue parameter, a TypeError is reported. #59

@lee-cq

Description

@lee-cq

version: 0.36.3
winrt version: 3.2.1

Test Code:

from win11toast import toast

toast('Hello Python🐍', dialogue='你好')

ncountered an error:

Traceback (most recent call last):
  File "D:\Code\Code_new\translate\.venv\Lib\site-packages\win11toast.py", line 204, in speak
    player.source = MediaSource.create_from_stream(stream, stream.content_type())
                                                           ~~~~~~~~~~~~~~~~~~~^^
TypeError: 'str' object is not callable

I checked the source code. stream.content_type is an attribute and should not be called, so the parentheses () need to be removed.

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