alexander-akhmetov/python-shortcuts

url error

kyuty opened this issue · 2 comments

kyuty commented

shortcuts https://www.icloud.com/shortcuts/f50e51246720489c85d01149694b214b b.toml
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/bin/shortcuts", line 13, in
load_entry_point('shortcuts==0.10.0', 'console_scripts', 'shortcuts')()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shortcuts/cli.py", line 79, in main
convert_shortcut(args.file, args.output)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shortcuts/cli.py", line 34, in convert_shortcut
sc = shortcuts.Shortcut.loads(sc_data, file_format=shortcuts.FMT_SHORTCUT)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shortcuts/shortcut.py", line 53, in loads
return cls._get_loader_class(file_format).loads(string)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shortcuts/loader.py", line 71, in loads
shortcut.actions.append(cls._action_from_dict(action))
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shortcuts/loader.py", line 88, in _action_from_dict
for p, v in action_dict['WFWorkflowActionParameters'].items()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shortcuts/loader.py", line 89, in
if p in shortcut_name_to_field_name
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shortcuts/loader.py", line 120, in deserialized_data
return deserializer(self._data).deserialized_data
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shortcuts/loader.py", line 145, in deserialized_data
f'Unknown token attachment type: {field_type}',
shortcuts.exceptions.UnknownWFTextTokenAttachment: Unknown token attachment type: ActionOutput


sudo shortcuts https://www.icloud.com/shortcuts/c92f72b4f82d4f09bb3e7f60d690a1d9 a.toml
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/bin/shortcuts", line 13, in
load_entry_point('shortcuts==0.10.0', 'console_scripts', 'shortcuts')()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shortcuts/cli.py", line 79, in main
convert_shortcut(args.file, args.output)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shortcuts/cli.py", line 34, in convert_shortcut
sc = shortcuts.Shortcut.loads(sc_data, file_format=shortcuts.FMT_SHORTCUT)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shortcuts/shortcut.py", line 53, in loads
return cls._get_loader_class(file_format).loads(string)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shortcuts/loader.py", line 71, in loads
shortcut.actions.append(cls._action_from_dict(action))
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shortcuts/loader.py", line 81, in _action_from_dict
action_params=action_dict,
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/shortcuts/actions/registry.py", line 75, in get_by_itype
raise exceptions.UnknownActionError(itype, action_dict=action_params)
shortcuts.exceptions.UnknownActionError:
Unknown shortcut action: "is.workflow.actions.choosefromlist"

        Please, check documentation to add new shortcut action, or create an issue:
        Docs: https://github.com/alexander-akhmetov/python-shortcuts/tree/master/docs/new_action.md

        https://github.com/alexander-akhmetov/python-shortcuts/

        Action dictionary:

        {'WFWorkflowActionIdentifier': 'is.workflow.actions.choosefromlist', 'WFWorkflowActionParameters': {'WFChooseFromListActionPrompt': '加密安全性?', 'CustomOutputName': 'Security Type', 'UUID': 'C704598C-0FB2-49D6-A04A-DBB4D29755E1'}}

Hi!

This action is already in the repository, but I need to make a new release. I will try to do this in a few days, but if you want to use it now, you can try to get the latest master.

Sorry for the delay. Version 0.11.0 now has this action. Probably, the shortcut which you are trying to convert has other unknown actions, open another issue if so, please.