(2019-04-15, 00:03)redglory Wrote: @DanCooper I'm haveing trouble tunning EMM from commandline without splash screen where updating tvseries.
Tried putting -nowindow as first and last command but it always shows the splashscreen and when running from python suprocess it throws an exception:
python:
Unhandled Exception: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
Close
My command:
python:
INFO:EmberMediaManager:Starting Ember Media Manager with application arguments: ['D:\\EmberMediaManager\\Ember Media Manager.exe', u'-profile', u'redglory', u'-nowindow', u'-scanfolder', u'"T:\\TV\\Billions"']
Close
EDIT: I think it was the Trakt dialog that was trying to pop... will try again ![Smile Smile](https://forum.kodi.tv/images/smilies/smile.png)
It was not the trakt popup...
I've disabled trakt and the problem persists...
When I run it using CMD it works and popup doesn't show. But when I try with Popen it throws the exception.
I'm confused as I have one script for movies that works and is the same (with the necessary adjustments) as the one for tvshows...
Will try to find out the problem.
EDIT: Tried to run script inside CMD and it worked. No splash screen opened and no error.
python:
λ C:\Python27\python.exe D:\Sonarr\scripts\EmberMediaManager\main.py
INFO:EmberMediaManager:Sonarr Ember Media Manager post-processing script started.
INFO:EmberMediaManager:TV Show None not yet on kodi's library. Set Full Update.
INFO:EmberMediaManager:Starting Ember Media Manager with application arguments: ['D:\\EmberMediaManager\\Ember Media Manager.exe', u'-profile', u'redglory', u'-updatetvshows', u'-scrapetvshows', u'newauto', u'all', u'-nowindow']
INFO:EmberMediaManager:TV Show Title: None
INFO:EmberMediaManager:TV Show Full Path: None
INFO:EmberMediaManager:TV Show TVDB ID: None
INFO:EmberMediaManager:TV Show Internal ID: None
INFO:EmberMediaManager:Ember Media Manager: running on PID: (10844)
INFO:EmberMediaManager:Ember Media Manager ran sucessfully for: 197 seconds
Next step was change Sonarr script from
python:
c:\Python27\pythonw.exe
to
python:
c:\Python27\python.exe
to match CMD command and it didn't work. Changed again to pythonw.exe
Same error:
python:
pythonw.exeLogged from file main.py, line 11920:37
pythonw.exeTypeError: not enough arguments for format string20:37
pythonw.exemsg = msg % self.args20:37
pythonw.exeFile "C:\Python27\lib\logging\__init__.py", line 329, in getMessage20:37
pythonw.exerecord.message = record.getMessage()20:37
pythonw.exeFile "C:\Python27\lib\logging\__init__.py", line 465, in format20:37
pythonw.exereturn fmt.format(record)20:37
pythonw.exeFile "C:\Python27\lib\logging\__init__.py", line 734, in format20:37
pythonw.exemsg = self.format(record)20:37
pythonw.exeFile "C:\Python27\lib\logging\__init__.py", line 861, in emit20:37
pythonw.exeTraceback (most recent call last):20:37
pythonw.exeat System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)20:37
pythonw.exeat System.Windows.Forms.Control.WndProcException(Exception e)20:37
pythonw.exeat System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)20:37
pythonw.exeat Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnUnhandledException(UnhandledExceptionEventArgs e)20:37
pythonw.exeat Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.raise_UnhandledException(Object sender, UnhandledExceptionEventArgs e)20:37
pythonw.exeat Ember_Media_Manager.My.MyApplication.MyApplication_UnhandledException(Object sender, UnhandledExceptionEventArgs e)20:37
pythonw.exeat System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp)20:37
pythonw.exeUnhandled Exception: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.20:37
pythonw.exeINFO:EmberMediaManager:Ember Media Manager: running on PID: (9608)20:37
pythonw.exeINFO:EmberMediaManager:TV Show Internal ID: 14320:37
pythonw.exeINFO:EmberMediaManager:TV Show TVDB ID: 36089320:37
pythonw.exeINFO:EmberMediaManager:TV Show Full Path: T:\TV\Chernobyl20:37
pythonw.exeINFO:EmberMediaManager:TV Show Title: Chernobyl20:37
pythonw.exeINFO:EmberMediaManager:Starting Ember Media Manager with application arguments: ['D:\\EmberMediaManager\\Ember Media Manager.exe', u'-profile', u'redglory', u'-scanfolder', u'"T:\\TV\\Chernobyl"', u'-nowindow']20:37
pythonw.exeINFO:EmberMediaManager:TV Show Chernobyl already on kodi's library. Scan folder for new episode.20:37
pythonw.exeINFO:EmberMediaManager:Sonarr Ember Media Manager post-processing script started.20:37