•   
  • 1
  • 5
  • 6
  • 7
  • 8
  • 9(current)
WIP CommandLine
My scripts are:

Radarr
Link

Sonarr
Link

os.environ.get('EmberMediaManager') is set to
D:\\EmberMediaManager\\Ember Media Manager.exe

My last log on Sonarr:
pythonw.exe at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
pythonw.exe at System.Windows.Forms.Control.WndProcException(Exception e)
pythonw.exe at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
pythonw.exe at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnUnhandledException(UnhandledExceptionEventArgs e)
pythonw.exe at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.raise_UnhandledException(Object sender, UnhandledExceptionEventArgs e)
pythonw.exe at Ember_Media_Manager.My.MyApplication.MyApplication_UnhandledException(Object sender, UnhandledExceptionEventArgs e)
pythonw.exe at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp)
pythonw.exe 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.
pythonw.exe ERROR:EmberMediaManager:Ember Media Manager failed with: 255
pythonw.exe INFO:EmberMediaManager:Ember Media Manager: running on PID: (9716)
pythonw.exe INFO:EmberMediaManager:TV Show Internal ID: 128
pythonw.exe INFO:EmberMediaManager:TV Show TVDB ID: 253463
pythonw.exe INFO:EmberMediaManager:TV Show Full Path: T:\TV\Black Mirror
pythonw.exe INFO:EmberMediaManager:TV Show Title: Black Mirror
pythonw.exe INFO:EmberMediaManager:Starting Ember Media Manager with application arguments: ['D:\\EmberMediaManager\\Ember Media Manager.exe', u'-profile', u'redglory', u'-scanfolder', u'"T:\\TV\\Black Mirror"', u'-nowindow']
pythonw.exe INFO:EmberMediaManager:TV Show Black Mirror already on kodi's library. Scan folder for new episode.
pythonw.exe INFO:EmberMediaManager:Sonarr Ember Media Manager post-processing script started.

EDIT: while browsing my EMM log I saw this error at the same timestamp as previous python script:
Code:
2019-06-05 10:22:13.4798;Ember_Media_Manager.My.MyApplication;Ember_Media_Manager.My.MyApplication.MyApplication_Startup;1;INFO;====Ember Media Manager starting up====;
2019-06-05 10:22:13.5678;Ember_Media_Manager.My.MyApplication;Ember_Media_Manager.My.MyApplication.MyApplication_Startup;1;INFO;====Version 1.4.90 x64;
2019-06-05 10:22:19.7072;EmberAPI.Database;EmberAPI.Database.Connect_MyVideos;1;ERROR;Connect_MyVideos    Unable to open media database connection.;"EXCEPTION OCCURRED:System.DllNotFoundException: Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum op)
   at System.Data.SQLite.SQLite3.StaticIsInitialized()
   at System.Data.SQLite.SQLiteLog.Initialize()
   at System.Data.SQLite.SQLiteConnection..ctor(String connectionString, Boolean parseViaFramework)
   at EmberAPI.Database.Connect_MyVideos()*   at System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum op)
   at System.Data.SQLite.SQLite3.StaticIsInitialized()
   at System.Data.SQLite.SQLiteLog.Initialize()
   at System.Data.SQLite.SQLiteConnection..ctor(String connectionString, Boolean parseViaFramework)
   at EmberAPI.Database.Connect_MyVideos()"
2019-06-05 10:22:19.7322;Ember_Media_Manager.My.MyApplication;Ember_Media_Manager.My.MyApplication.MyApplication_UnhandledException;1;ERROR;EmberAPI;"EXCEPTION OCCURRED:System.NullReferenceException: Object reference not set to an instance of an object.
   at EmberAPI.Database.LoadAllGenres()
   at Ember_Media_Manager.frmMain.frmMain_Load(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)*   at EmberAPI.Database.LoadAllGenres()
   at Ember_Media_Manager.frmMain.frmMain_Load(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)"

Could this be the culprit?
Image Image
Reply
Finaly!

Googled a bit the problem and ended up copying 
Code:
SQLite.Interop.dll
from x64 folder to EMM root folder where the
Code:
Ember Media Manager.exe
is placed.

All is working now. 

Don't understand why it worked for movies scraping but it is working now Smile
Image Image
Reply
@redglory that issue has been around for about a year, not just a python problem 2732437 (post)
Reply
Ok thx.

Works for now
Image Image
Reply
That's strange, all DLL's will be indexed manually at the start and before the command line will be exequeted. I'ill check that, bug has been added to the tracker: Link
German Ember Media Manager Support

Daily Builds - Link
Latest official Ember-MM version - Ember Media Manager 1.4.x
Reply
(2019-06-07, 09:30)DanCooper Wrote: That's strange, all DLL's will be indexed manually at the start and before the command line will be exequeted. I'ill check that, bug has been added to the tracker: Link
I'm having same problem and I already have the file on the root of EmberMediaManager.exe

This only happens for tv shows...

I had to call my script using powershell script as on latest Sonarr version you can't no longer pass arguments...
python2w C:\ProgramData\Sonarr\scripts\EmberMediaManager\main.py

I can't even get anything on EMM logs.

If I run my script directly on powershell it calls it without a problem.
Image

Ran again with same error on Sonarr log file:
powershell.exe at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
powershell.exe at System.Windows.Forms.Control.WndProcException(Exception e)
powershell.exe at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
powershell.exe at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnUnhandledException(UnhandledExceptionEventArgs e)
powershell.exe at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.raise_UnhandledException(Object sender, UnhandledExceptionEventArgs e)
powershell.exe at Ember_Media_Manager.My.MyApplication.MyApplication_UnhandledException(Object sender, UnhandledExceptionEventArgs e)
powershell.exe at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp)
powershell.exe 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.
powershell.exe ERROR:EmberMediaManager:Ember Media Manager failed with: -1073740771
powershell.exe INFO:EmberMediaManager:Ember Media Manager: running on PID: (15192)
powershell.exe INFO:EmberMediaManager:TV Show Internal ID: 149
powershell.exe INFO:EmberMediaManager:TV Show TVDB ID: 366026
powershell.exe INFO:EmberMediaManager:TV Show Full Path: T:\TV\Typewriter
powershell.exe INFO:EmberMediaManager:TV Show Title: Typewriter
powershell.exe INFO:EmberMediaManager:Starting Ember Media Manager with application arguments: ['C:\\ProgramData\\EmberMediaManager\\Ember Media Manager.exe', u'-profile', u'redglory', u'-scanfolder', u'"T:\\TV\\Typewriter"', u'-nowindow']
powershell.exe INFO:EmberMediaManager:TV Show Typewriter already on kodi's library. Scan folder for new episode.
powershell.exe INFO:EmberMediaManager:Sonarr Ember Media Manager post-processing script started.

My application folder
Image
Image Image
Reply
I've ended up creating executable python script and call it on Sonarr (created it with options: -w (No Console) -F (Onefile).

It works like a charm
Image Image
Reply
  •   
  • 1
  • 5
  • 6
  • 7
  • 8
  • 9(current)
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
CommandLine00