fix TypeError: 'winrt._winrt_windows_foundation_collections.ValueSet'…#57
Closed
better-er wants to merge 1 commit intoGitHub30:mainfrom
Closed
fix TypeError: 'winrt._winrt_windows_foundation_collections.ValueSet'…#57better-er wants to merge 1 commit intoGitHub30:mainfrom
better-er wants to merge 1 commit intoGitHub30:mainfrom
Conversation
… object is not callable & Python version 3.14 does not support the use of 'return' inside a 'finally' clause.
Radmond89
reviewed
Jan 14, 2026
There was a problem hiding this comment.
HELLO!!
I've studied your code.
- TABs and spaces )
- here's the corrected moment for win11 (py 3.14) in 165 line :
def activated_args(_, event):
global result
e = ToastActivatedEventArgs._from(event)
user_input = {}
if e.user_input:
for name in e.user_input:
if name in e.user_input:
value = IPropertyValue._from(e.user_input[name])
user_input[name] = value.get_string()
result = {
'arguments': e.arguments,
'user_input': user_input
}
return result
- I noticed a strange behavior when working with icons and image.
This solution helped me. But https doesn't work =(. It might be due to the blocking of win itself. I don't know.
(in 46 line)
def add_icon(icon, document):
if isinstance(icon, str):
from pathlib import Path
path = Path(icon)
if path.is_file():
icon = f"file:///{path.absolute().as_posix()}"
icon = {
'placement': 'appLogoOverride',
'hint-crop': 'circle',
'src': icon
}
binding = document.select_single_node('//binding')
image = document.create_element('image')
for name, value in icon.items():
image.set_attribute(name, value)
binding.append_child(image)
def add_image(img, document):
if isinstance(img, str):
from pathlib import Path
path = Path(img)
if path.is_file():
img = f"file:///{path.absolute().as_posix()}"
img = {
'src': img
}
binding = document.select_single_node('//binding')
image = document.create_element('image')
for name, value in img.items():
image.set_attribute(name, value)
binding.append_child(image)```
Owner
|
#58 merged ok? |
Author
|
ok |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… object is not callable & Python version 3.14 does not support the use of 'return' inside a 'finally' clause.
details in issue #56