Closed GiorgosXou closed 5 months ago
it's the one caused by the cmds.conf
entry "yat | copy | 'pattern':'.+\.txt'...
due to ast.literal_eval(...)
ok I think i solved it
go to ~/.config/tuifi/cmds.conf
and change "yat | copy | 'pattern':'.+\.txt'..
to "yat | copy | 'pattern':'.+\\.txt'..
You could use raw string r'.+\.txt'
, they are meant for storing things like regex pattern that can have "illegal character sequences"
@Sigmanificient it's due to variable evaluation: https://github.com/GiorgosXou/TUIFIManager/blob/1ccb8f255d1ae43bef240fdd024bb7a8f67e9bbe/TUIFIManager/__init__.py#L1102
(Discord disabled my account btw :/ | Probably due to experimenting with their private api)
you may want to refactor that line
ln = line.split('|') # command, args, type, comment | using "|" because this is an __illegal_filename_characters
self.command_events[ln[0].strip()] = (self.command_types[ln[1].strip()], ast.literal_eval('{'+ln[2].strip()+'}'), ln[3].strip())
cmd, args, typ, comment = map(str.strip, line.split('|')) # using "|" because this is an __illegal_filename_characters
self.command_events[cmd] = (self.command_types[args], ast.literal_eval('{'+typ+'}'), comment)
Since python 3.12 this kind of warnings appeared, I just solved them them but the one which is visible and intercepts the program, might need to be fixed manually by user ...
https://github.com/home-assistant/core/issues/110263