unoconv / unoserver

MIT License
496 stars 69 forks source link

REST API implementation #37

Closed 1459416736 closed 10 months ago

1459416736 commented 2 years ago

Hi, guys. I call converter.convert in rest api interface, always return an error. File "/home/liubo/project/python/xulan-server/app/api/api_v1/printer/printer.py", line 52, in max_upload conv = converter.UnoConverter() File "/home/liubo/project/python/xulan-server/app/extends/unoserver/converter.py", line 69, in init self.resolver = self.local_context.ServiceManager.createInstanceWithContext( SystemError: pyuno runtime is not initialized, (the pyuno.bootstrap needs to be called before using any uno classes)

However, it is normal for me to execute unoconvert on the command line

regebro commented 1 year ago

Yeah, that's likely not going to work, you need to run it as a separate process with subprocess.Popen() or similar.