Page 3 of 3
Re: Insert Pics plugin
Posted: 08.09.2023 06:57
by SamC
I've checked again that it's the code "os.startfile(doc_path)" in plugin will crash Cuda. It seems that's the code only valid in Windows..
I also checked it directly on the console, Cuda crashed too.
Is it konwn issue? Other method to open a file by other program using Cuda Plugin?
Re: Insert Pics plugin
Posted: 08.09.2023 07:00
by main Alexey
ProjectManager does this. but it's the same as yours... so, IDK.
Code: Select all
def action_open_def(self):
fn = str(self.get_location_by_index(self.selected))
if not os.path.isfile(fn):
return
suffix = app_proc(PROC_GET_OS_SUFFIX, '')
if suffix=='':
#Windows
os.startfile(fn)
elif suffix=='__mac':
#macOS
os.system('open "'+fn+'"')
elif suffix=='__haiku':
#Haiku
msg_status('TODO: implement "Open in default app" for Haiku')
else:
#other Unixes
os.system('xdg-open "'+fn+'"')
Re: Insert Pics plugin
Posted: 08.09.2023 08:12
by SamC
Associated with Chinese characters, if all ASCII characters, It's OK~
Re: Insert Pics plugin
Posted: 08.09.2023 09:34
by main Alexey
I also checked it directly on the console, Cuda crashed too.
Is it konwn issue?
no. and seems it is Python library issue, not Cud issue.
Other method to open a file by other program using Cuda Plugin?
this should be asked at Python sites...
Re: Insert Pics plugin
Posted: 08.09.2023 10:03
by SamC
Thanks~ I will keep using standard letters to avoid this.