Update Namespace unavailable in PyCrust

Do you have questions about writing plugins or scripts in Python? Meet the coders here.

Re: Update Namespace unavailable in PyCrust

Postby kkl » Wed Dec 07, 2016 11:37 pm

Whoops! Talk about hiding in plain sight. I don't know if anyone has ever written a plug-in like this before you, one that actually changes the EG UI. Sorry, I neglected to go back and re-read your comments.

Attached is the log.txt file. The 'hang' now occurs after the interface closes, but the icon remains in the system tray (with no options) and it's still running in task manager.
Attachments
Log.txt
(5.51 KiB) Downloaded 27 times
kkl
Experienced User
 
Posts: 305
Joined: Wed May 04, 2011 9:32 pm

Re: Update Namespace unavailable in PyCrust

Postby kgschlosser » Thu Dec 08, 2016 12:04 am

No worries. yeah anything and everything i can change in EG.

so with this what i did was instead of having a separate dialog you have to deal with. i added 2 panes to the EG UI andf those 2 panes can be moved from place to place in the UI, resized differently, as well as you can float them like a dialog.

i thought that would give the user ample enough choices on what to put where.

now it does remember the size and the column widths. but i have not coded a means to use the size properly.

but it should function to what you asked for and then some.

I also coded it the way i did because i am going to send this guy up to the power that be and maybe they will add it to EG as i fell it is something that should be included in the core and not a plugin.i don't make those calls. so we will see what happens.

i am going to take a look see at the file.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2111
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Update Namespace unavailable in PyCrust

Postby kgschlosser » Thu Dec 08, 2016 12:19 am

i really do not know what is causing it. i am going to modify the code to see if we can get an error message. I know where it's stalling. but when i close EG and i am running 1722 it closes nice. give me a couple of hours,
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2111
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Update Namespace unavailable in PyCrust

Postby kgschlosser » Thu Dec 08, 2016 7:34 am

give this whirly bird a twirl

i think i am sure i know what was cauing it. i didn't call Update() for the auiManager in eg after detaching the panes.

not calling Update() could cause odd behavior. which could be why your computer hangs and mine doesn't


but i still added some exception handling. tho i do not think an exception gets raised for this because there is no real error. just odd behavior
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2111
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Update Namespace unavailable in PyCrust

Postby kkl » Thu Dec 08, 2016 3:43 pm

Sorry, same problem. Still running in task manager and tray after exit. Tried it on 2nd PC with same result. Both 0.4.1.r1722 and both Windows 10 v1607, one Home and one Pro.
kkl
Experienced User
 
Posts: 305
Joined: Wed May 04, 2011 9:32 pm

Re: Update Namespace unavailable in PyCrust

Postby kgschlosser » Thu Dec 08, 2016 4:38 pm

well let me see if it's a windows 10 specific issue. i don't know if the virtual machine i hav set up with windows 10 will do the trick. but i am going to give it a shot
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2111
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Update Namespace unavailable in PyCrust

Postby kgschlosser » Thu Dec 08, 2016 4:57 pm

I cannot get it to replicate this issue. window 7 works fine. windows 10 works fine, version 1722 on either or and .5beta4 works fine on both. I am trying. i am not sure what it is. are you just opening EG and then closing it again???

are there any steps i need to do that i am missing to replicate this problem??

maybe it's something else that you have installed causing the issue


i don't know. are you using a blank tree?

here is the log from my windows 10 1722 test. it closes perfect.

the only way i would be able to replicate this is if i had a copy of your tre and a copy of you plugins folder. is your version of EG altered at all in any way??. i know that i had you modify that trigger event. but that wouldn't cause any issues. is there anything else??


Code: Select all
08:51:22: 0 MainThread: ----------------------------------------
08:51:22: 0 MainThread:         EventGhost started
08:51:22: 0 MainThread: ----------------------------------------
08:51:22: 0 MainThread: Version: 0.4.1.r1722
08:51:22: 0 MainThread: missing guid in plugin: C:\Program Files (x86)\EventGhost\plugins\GameVoice
08:51:22: 0 MainThread: missing guid in plugin: C:\Program Files (x86)\EventGhost\plugins\Ping
08:51:22: 0 MainThread: PluginManager.ScanAllPlugins :0.21116750000000001
08:51:22: 0 MainThread: SendKeysParser.__init__()
08:51:22: 0 MainMessageReceiver: MainMessageReceiver.__MainLoop()
08:51:22: 0 MainMessageReceiver: MainMessageReceiver.Setup()
08:51:22: 0 MainThread: Document.ShowFrame()
08:51:22: 0 MainThread: Log.GetData()
08:51:22: 0 MainThread: Document.ShowFrame => None
08:51:22: 0 ActionThread: ActionThread.__MainLoop()
08:51:22: 0 EventThread: EventThread.__MainLoop()
08:51:23: 0 EventThread: EventThread.StartSession(filename=u'C:\\Users\\Kevin\\Desktop\\testtree.xml')
08:51:23: 0 ActionThread: ActionThread.StartSession(filename=u'C:\\Users\\Kevin\\Desktop\\testtree.xml')
08:51:23: 0 MouseThread: MouseThread.run()
08:51:23: 0 ActionThread: Document.Load(filePath=u'C:\\Users\\Kevin\\Desktop\\testtree.xml')
08:51:23: 1 MainThread: OSDFrame.__init__(parent=None)
08:51:23: 0 ActionThread: StartLoad(cls=<class 'eg.Classes.TreeLink.TreeLink'>)
08:51:23: 0 Thread-3: SessionChangeNotifier.Register()
08:51:23: 0 ActionThread: Document.SetExpandState(expanded=set([0, 1]))
08:51:23: 0 ActionThread: XML loaded in 0.080445 seconds.
08:51:23: 0 X10ThreadWorker: X10ThreadWorker.__MainLoop()
08:51:23: 0 X10ThreadWorker: X10ThreadWorker.__MainLoop => None
08:51:23: 0 ActionThread: GlobalMonitor.CreateMenu()
08:51:23: 0 ActionThread: ActionThread.StartSession => None
08:51:25: 1 MainThread: UI.CloseUI()
08:51:25: 1 MainThread: MainFrame.OnClose(dummyEvent=<wx.CloseEvent>)
08:51:25: 1 MainThread: App.Exit()
08:51:25: 1 MainThread: Document.CheckFileNeedsSave()
08:51:25: 1 MainThread: Document.CheckFileNeedsSave => 5100
08:51:25: 1 MainThread: Document.Close()
08:51:25: 1 MainThread: MainFrame.Destroy()
08:51:25: 1 MainThread: LogCtrl.Destroy()
08:51:25: 1 MainThread: TreeCtrl.Destroy()
08:51:25: 1 MainThread: StatusBar.Destroy()
08:51:25: 1 MainThread: StatusBar.__del__()
08:51:25: 1 MainThread: MainFrame.Destroy => True
08:51:25: 1 MainThread: Document.GetExpandState()
08:51:25: 1 MainThread: Document.Close => None
08:51:25: 1 MainThread: App.OnExit()
08:51:25: 1 MainThread: Triggering OnClose
08:51:25: 1 MainThread: Calling exit functions
08:51:25: 1 MainThread: <function CloseOSD at 0x05209170>
08:51:25: 1 MainThread: Calling eg.DeInit()
08:51:25: 1 MainThread: stopping threads
08:51:25: 0 ActionThread: ActionThread.StopSession()
08:51:25: 0 ActionThread: UnloadPlugins()
08:51:25: 0 ActionThread: closing C:\Program Files (x86)\EventGhost\plugins\X10
08:51:25: 0 ActionThread: closing C:\Program Files (x86)\EventGhost\plugins\ZoomPlayer
08:51:25: 0 ActionThread: closing C:\Program Files (x86)\EventGhost\plugins\Winamp
08:51:25: 0 ActionThread: closing C:\Program Files (x86)\EventGhost\plugins\Task
08:51:25: 0 ActionThread: closing C:\ProgramData\EventGhost\plugins\GlobalMonitor
08:51:25: 0 ActionThread: GlobalMonitor.__stop__()
08:51:25: 0 ActionThread: closing C:\Program Files (x86)\EventGhost\plugins\EventGhost
08:51:25: 0 ActionThread: closing C:\Program Files (x86)\EventGhost\plugins\System
08:51:25: 0 ActionThread: System.__stop__()
08:51:25: 0 ActionThread: System.__stop__ => None
08:51:25: 0 ActionThread: closing C:\Program Files (x86)\EventGhost\plugins\Window
08:51:25: 0 ActionThread: closing C:\Program Files (x86)\EventGhost\plugins\Mouse
08:51:25: 0 ActionThread: Mouse.__stop__()
08:51:25: 0 ActionThread: Mouse.__close__()
08:51:25: 0 ActionThread: ActionThread.__MainLoop => None
08:51:25: 1 MainThread: shutting down
08:51:25: 0 EventThread: EventThread.__MainLoop => None
08:51:25: 1 MainThread: MainMessageReceiver.Stop()
08:51:25: 0 MainMessageReceiver: MainMessageReceiver.__MainLoop => None
08:51:25: 0 MouseThread: MouseThread.run => None
08:51:25: 1 MainThread: Waited for threads shutdown: 0.031146 s
08:51:25: 1 MainThread: Done!
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2111
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Update Namespace unavailable in PyCrust

Postby kgschlosser » Thu Dec 08, 2016 5:00 pm

i am going to modify the debugging code to give me more information about your environment and what is installed it is going to take me a while to generate this so you will have to hold on for another day or so.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2111
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Update Namespace unavailable in PyCrust

Postby kkl » Thu Dec 08, 2016 5:39 pm

Please don't hurry on my account. It's a nice to have feature, not a must have. I've tried multiple different ways including most of the ones you've mentioned, but I will try to go through every permutation and report back.

Hopefully some others will try it out to help figure out if it's something specific to me.
kkl
Experienced User
 
Posts: 305
Joined: Wed May 04, 2011 9:32 pm

Re: Update Namespace unavailable in PyCrust

Postby kgschlosser » Thu Dec 08, 2016 9:14 pm

If you want and this will help. If you can compress the EG folder the plugins folder and the tree you are using and send it over to me. In a PM I have no other means of trying to replicate this other then you sending me all the files. Oh I will also need the Users/SOMEUSER/appdata/roaming/EventGhost folder

This will really help. Then I can exactly duplicate your setup.

When I get back to my PC I will upload the plugin again. Maybe I sent up the wrong version. I did a code check against my source and the egplugin file and the code is the same. But I could also swear I changed the version number. And neither my source or the egplugin have the updated version.


You can do that as well. Go to your C:/program data/EventGhost/plugins/globalmonitor folder and open __init__.py with notepad. And at the top you will see eg.RegisterPlugin just below that you will see version=
If it is anything other then 0.1b something got mixed up on my end and I posted a wrong version
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2111
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Update Namespace unavailable in PyCrust

Postby kkl » Thu Dec 08, 2016 10:19 pm

The version number in __init__.py is 0.1b. When opening GlobalMonitor,egplugin, version 0.2b is listed in the confirmation window. When adding the plug-in in the EG gui, 0.1b is shown. Please let me know if you still need those other files sent. Thanks.
kkl
Experienced User
 
Posts: 305
Joined: Wed May 04, 2011 9:32 pm

Re: Update Namespace unavailable in PyCrust

Postby kgschlosser » Fri Dec 09, 2016 5:54 am

yeah i do send em
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2111
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Update Namespace unavailable in PyCrust

Postby kkl » Fri Dec 09, 2016 5:18 pm

To eliminate as many other factors as possible, I uninstalled EG, deleted all EG folders, then re-installed. I only added the GlobalMonitor.plugin. You can see the different version numbers in the screen captures.

A1Capture.JPG


A2Capture.JPG


After adding the plugin, I saved the configuration file and exited. The EG icon remains in the system tray and "Eventghost Automation Tool (32 bit)" in Background Processes of Task Manager (it does move from Apps to Background processes). I've waited up to 20 minutes before killing the task.

I will PM the files.
kkl
Experienced User
 
Posts: 305
Joined: Wed May 04, 2011 9:32 pm

Re: Update Namespace unavailable in PyCrust

Postby kgschlosser » Fri Dec 09, 2016 5:28 pm

i'm not concerned about the version thing. i changed it in the egplugin file but not in the actual __init__ that will not affect anything...


so this is actually happening from a fresh install???


i really don't know then. i am sure i will stumble across it. but here is the plugin file again just in case i got something all mixed up.

this plugin file works for me under windows 10 running 1722
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 2111
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Update Namespace unavailable in PyCrust

Postby kkl » Fri Dec 09, 2016 6:50 pm

Yes, fresh install. I'm sure you will figure it out. From just looking at it briefly, I see you did implement non-eg.globals variables. Very nice.
kkl
Experienced User
 
Posts: 305
Joined: Wed May 04, 2011 9:32 pm

PreviousNext

Return to Coding Corner

Who is online

Users browsing this forum: No registered users and 1 guest