WIP CommandLine
(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
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
Image Image
Reply


Messages In This Thread
CommandLine - by DanCooper - 2015-06-03, 11:27
RE: CommandLine - by shaktoo - 2015-06-04, 03:44
RE: CommandLine - by DanCooper - 2015-06-04, 10:25
RE: CommandLine - by JohnSedders - 2016-10-24, 23:37
RE: CommandLine - by shaktoo - 2015-06-05, 11:30
RE: CommandLine - by zerocool_ie - 2015-06-05, 18:04
RE: CommandLine - by DanCooper - 2015-06-06, 18:27
RE: CommandLine - by Cocotus - 2015-06-08, 10:16
RE: CommandLine - by DanCooper - 2015-06-08, 10:22
RE: CommandLine - by DanCooper - 2016-04-07, 11:17
RE: CommandLine - by komplex - 2016-04-07, 17:23
RE: CommandLine - by DanCooper - 2016-04-07, 19:10
RE: CommandLine - by komplex - 2016-04-07, 19:19
RE: CommandLine - by D0bby - 2016-05-20, 16:17
RE: CommandLine - by komplex - 2016-05-20, 17:03
RE: CommandLine - by komplex - 2016-05-27, 15:47
RE: CommandLine - by DanCooper - 2016-05-27, 16:31
RE: CommandLine - by Pr.Sinister - 2016-07-07, 07:17
RE: CommandLine - by DanCooper - 2016-07-07, 12:22
RE: CommandLine - by Pr.Sinister - 2016-07-08, 03:30
RE: CommandLine - by zerocool_ie - 2016-07-29, 00:27
RE: CommandLine - by DanCooper - 2016-07-29, 00:47
RE: CommandLine - by DanCooper - 2016-07-29, 10:33
RE: CommandLine - by redglory - 2016-07-29, 10:52
RE: CommandLine - by DanCooper - 2016-07-29, 13:26
RE: CommandLine - by redglory - 2016-07-29, 16:22
RE: CommandLine - by zerocool_ie - 2016-07-29, 20:03
RE: CommandLine - by zerocool_ie - 2016-07-29, 16:56
RE: CommandLine - by redglory - 2016-07-30, 19:44
RE: CommandLine - by zerocool_ie - 2016-07-30, 22:44
RE: CommandLine - by redglory - 2016-07-31, 16:00
RE: CommandLine - by DanCooper - 2016-08-10, 09:26
RE: CommandLine - by redglory - 2016-08-10, 10:31
RE: CommandLine - by redglory - 2016-08-10, 11:28
RE: CommandLine - by redglory - 2016-10-25, 00:24
RE: CommandLine - by JohnSedders - 2016-10-25, 19:11
RE: CommandLine - by Boulder - 2017-02-11, 11:06
RE: CommandLine - by DanCooper - 2017-02-11, 12:59
RE: CommandLine - by Boulder - 2017-02-11, 13:38
RE: CommandLine - by redglory - 2017-02-27, 18:52
RE: CommandLine - by Zebbe152 - 2017-04-26, 11:32
RE: CommandLine - by DanCooper - 2017-04-26, 12:11
RE: CommandLine - by shaktoo - 2017-08-17, 21:15
RE: CommandLine - by komplex - 2017-08-17, 22:02
RE: CommandLine - by shaktoo - 2017-08-17, 23:21
RE: CommandLine - by Chrolm - 2017-08-20, 02:56
RE: CommandLine - by DanCooper - 2017-08-20, 03:20
RE: CommandLine - by Chrolm - 2017-09-08, 21:52
RE: CommandLine - by shaktoo - 2017-10-09, 14:04
RE: CommandLine - by DanCooper - 2017-10-09, 14:45
RE: CommandLine - by komplex - 2017-10-09, 14:45
RE: CommandLine - by Fail$tyle420 - 2017-10-10, 20:44
RE: CommandLine - by DanCooper - 2017-10-10, 23:04
RE: CommandLine - by Fail$tyle420 - 2017-10-10, 23:28
RE: CommandLine - by shaktoo - 2017-10-16, 17:00
RE: CommandLine - by Fail$tyle420 - 2017-10-16, 19:08
RE: CommandLine - by shaktoo - 2017-10-17, 16:05
RE: CommandLine - by Fail$tyle420 - 2017-10-18, 01:11
RE: CommandLine - by NewYears1978 - 2017-11-09, 06:42
RE: CommandLine - by DanCooper - 2017-11-09, 10:30
RE: CommandLine - by NewYears1978 - 2017-11-10, 03:09
RE: CommandLine - by DanCooper - 2017-11-11, 17:36
RE: CommandLine - by NewYears1978 - 2017-11-12, 05:15
RE: CommandLine - by DanCooper - 2017-11-12, 19:01
RE: CommandLine - by redglory - 2017-11-11, 16:41
RE: CommandLine - by Fail$tyle420 - 2017-11-11, 17:00
RE: CommandLine - by redglory - 2017-11-11, 20:30
RE: CommandLine - by redglory - 2017-11-12, 20:39
RE: CommandLine - by DanCooper - 2017-11-12, 20:51
RE: CommandLine - by redglory - 2017-11-12, 21:29
RE: CommandLine - by Fail$tyle420 - 2017-11-13, 18:37
RE: CommandLine - by DanCooper - 2017-11-13, 22:12
RE: CommandLine - by redglory - 2017-11-14, 01:42
RE: CommandLine - by redglory - 2017-11-13, 20:56
RE: CommandLine - by komplex - 2017-11-13, 21:36
RE: CommandLine - by redglory - 2017-11-27, 17:11
RE: CommandLine - by Fail$tyle420 - 2017-11-14, 17:47
RE: CommandLine - by komplex - 2017-11-27, 17:03
RE: CommandLine - by komplex - 2017-11-27, 17:23
RE: CommandLine - by redglory - 2017-11-27, 17:48
RE: CommandLine - by NewYears1978 - 2017-12-02, 06:31
RE: CommandLine - by redglory - 2017-12-02, 14:30
RE: CommandLine - by NewYears1978 - 2017-12-02, 17:00
RE: CommandLine - by redglory - 2017-12-02, 18:31
RE: CommandLine - by komplex - 2017-12-02, 13:42
RE: CommandLine - by NewYears1978 - 2017-12-07, 03:02
CommandLine - by redglory - 2017-12-07, 22:20
RE: CommandLine - by zerocool_ie - 2018-01-26, 18:28
RE: CommandLine - by DanCooper - 2018-01-28, 22:29
RE: CommandLine - by zerocool_ie - 2018-01-29, 16:13
RE: CommandLine - by DanCooper - 2018-01-26, 18:33
RE: CommandLine - by zerocool_ie - 2018-01-26, 18:35
RE: CommandLine - by komplex - 2018-01-28, 22:37
RE: CommandLine - by DanCooper - 2018-01-28, 22:50
RE: CommandLine - by komplex - 2018-01-28, 22:58
RE: CommandLine - by Remus - 2018-03-29, 02:13
RE: CommandLine - by icegod001 - 2018-04-07, 05:54
RE: CommandLine - by DanCooper - 2018-04-07, 13:06
RE: CommandLine - by icegod001 - 2018-04-08, 07:29
RE: CommandLine - by DanCooper - 2018-04-16, 09:58
RE: CommandLine - by icegod001 - 2018-05-12, 08:28
RE: CommandLine - by macel - 2018-04-15, 08:08
RE: CommandLine - by DanCooper - 2018-04-16, 10:09
RE: CommandLine - by macel - 2018-04-17, 17:25
RE: CommandLine - by DanCooper - 2018-04-19, 13:28
RE: CommandLine - by exe222 - 2018-04-15, 09:24
RE: CommandLine - by DanCooper - 2018-04-16, 10:05
RE: CommandLine - by DanCooper - 2018-04-17, 19:41
RE: CommandLine - by macel - 2018-04-18, 06:13
RE: CommandLine - by DanCooper - 2018-04-18, 10:55
RE: CommandLine - by komplex - 2018-04-19, 15:14
RE: CommandLine - by DanCooper - 2018-04-20, 14:21
RE: CommandLine - by komplex - 2018-06-17, 16:01
RE: CommandLine - by DanCooper - 2018-06-17, 16:25
RE: CommandLine - by komplex - 2018-06-17, 16:43
RE: CommandLine - by abescalamis - 2018-07-20, 19:03
RE: CommandLine - by redglory - 2019-04-15, 00:03
RE: CommandLine - by redglory - 2019-05-31, 12:20
RE: CommandLine - by DanCooper - 2019-06-05, 09:36
RE: CommandLine - by redglory - 2019-06-05, 10:54
RE: CommandLine - by redglory - 2019-06-05, 11:11
RE: CommandLine - by redglory - 2019-06-06, 00:51
RE: CommandLine - by komplex - 2019-06-07, 01:08
CommandLine - by redglory - 2019-06-07, 01:45
RE: CommandLine - by DanCooper - 2019-06-07, 09:30
RE: CommandLine - by redglory - 2019-07-30, 22:33
RE: CommandLine - by redglory - 2019-08-07, 15:56
RE: CommandLine - by zerocool_ie - 2021-05-25, 16:23
RE: CommandLine - by redglory - 2021-05-26, 15:14
RE: CommandLine - by DanCooper - 2021-05-27, 01:21
RE: CommandLine - by zerocool_ie - 2021-05-28, 00:16
RE: CommandLine - by shummo - 2024-01-04, 16:11
RE: CommandLine - by redglory - 2024-04-10, 23:47
Logout Mark Read Team Forum Stats Members Help
CommandLine0