[FIXED] in a 'Python Shell' the 'help' command doesnt work

Found a bug in EventGhost? Report it here.
Diz
Experienced User
Posts: 121
Joined: Tue Jan 10, 2017 4:49 pm

Re: in a 'Python Shell' the 'help' command doesnt work

Post by Diz » Fri Jan 13, 2017 3:55 pm

ok... so the pugin starts now in the beta and appears to work until you actually trigger an action, when i do trigger an action i always get this error

---> Welcome to EventGhost <---
Lirc.Select
Run
XMPlay.Run()
Error in Action: "XMPlay.Run()"
Traceback (most recent call last) (1722):
File "<string>", line 1, in <module>
NameError: name 'XMPlay' is not defined

because im new to eventghost i never got round to setting up the xmplay plugin yet, but now ive tried with the old plugin and the 0.4.1.r1722 version, the behaviour is exactly the same! i didnt realize the plugin didnt work because it started correctly so i just assumed it worked. maybe the plugin never worked if it fails at line one!

User avatar
kgschlosser
Site Admin
Posts: 4165
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: in a 'Python Shell' the 'help' command doesnt work

Post by kgschlosser » Fri Jan 13, 2017 6:00 pm

you have to have a program called xmplay installed and running on your computer for this to work.

and this plugin was originally made by Pako and I am sure it worked just fine. however i do not know if things have changed with the xmplay application this is a very old plugin.
If you like the work I have been doing then feel free to Image

Diz
Experienced User
Posts: 121
Joined: Tue Jan 10, 2017 4:49 pm

Re: in a 'Python Shell' the 'help' command doesnt work

Post by Diz » Fri Jan 13, 2017 8:17 pm

yes of course, obviously i have xmplay running, thats why i want to use the plugin! it does not work.

User avatar
kgschlosser
Site Admin
Posts: 4165
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: in a 'Python Shell' the 'help' command doesnt work

Post by kgschlosser » Fri Jan 13, 2017 10:50 pm

OK i just wanted to make sure...

I am going to see what i can do... it may be that xmplay dropped dde.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 4165
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: in a 'Python Shell' the 'help' command doesnt work

Post by kgschlosser » Fri Jan 13, 2017 10:59 pm

it works perfect on my machine.


not sure what the issue is you are having.

did you point to the plugin to where you have xmplay installed???? (there is no installer so whatever folder you uncompressed it into)

and is xmplay actually running? it has to be visible. not as a taskbar icon.
If you like the work I have been doing then feel free to Image

Diz
Experienced User
Posts: 121
Joined: Tue Jan 10, 2017 4:49 pm

Re: in a 'Python Shell' the 'help' command doesnt work

Post by Diz » Sat Jan 14, 2017 4:09 am

in answer to your questions: yes. so im at a loss then. all the other plugins ive tried work, i cant understand why this one is any different! anyway thanks for your help :)

User avatar
kgschlosser
Site Admin
Posts: 4165
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: in a 'Python Shell' the 'help' command doesnt work

Post by kgschlosser » Sat Jan 14, 2017 5:43 pm

I haven't given up yet... the only command i tried was the volume.. maybe i should get into it a little more. what commands were your trying..
If you like the work I have been doing then feel free to Image

Diz
Experienced User
Posts: 121
Joined: Tue Jan 10, 2017 4:49 pm

Re: in a 'Python Shell' the 'help' command doesnt work

Post by Diz » Sun Jan 15, 2017 3:35 am

all the commands give that same error that i already posted... except that that the 'Error in Action' line gives the name of the action of course

Diz
Experienced User
Posts: 121
Joined: Tue Jan 10, 2017 4:49 pm

Re: in a 'Python Shell' the 'help' command doesnt work

Post by Diz » Sun Jan 15, 2017 4:49 am

ooooh i sussed out the problem! i think the actual actions that had been auto added the very first time i tried to use the plugin (back with old not working dde version) were somehow corrupted, so i deleted the plugin from eventghost and added it again so it auto added the actions again and now it works great! im just sorry i didnt think to try that earlier. thanks again for your time and the new working dde version :D

User avatar
kgschlosser
Site Admin
Posts: 4165
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: in a 'Python Shell' the 'help' command doesnt work

Post by kgschlosser » Sun Jan 15, 2017 4:55 am

do me a favor... copy the action from your tree and paste it here for me to see..

i think there may be an issue with something else and not the plugin...

have you tried completely deleting the plugin from your tree and then re adding it..

make sure you delete all the actions as well..


because of the NameError is saying XMPlay.Run..

which is not right. it should be saying eg.plugins.XMPlay.Run() and that would end up being a KeyError not a Name Error as well.. because eg.plugins is a dictionary and not a class object

so there is something else going on.. now I have seen this type of thing before but it happens when there is an error when loading a plugin. EG has a fit about actions in the tree that it cannot find a reference for. and this can cause problems. if you click the save button. And if you go and fix the issue with the plugin the actions won't function properly. because of clicking on the save has altered the actions in the tree.

so best bet is to delete all the actions from the tree...
then delete the plugin from the tree.
save EG
exit EG.
start it back up...
add the plugin.
then add an action and test it.

this way we make sure that the whole thing is fresh and that no odd anomalies have managed their way in
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 4165
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: in a 'Python Shell' the 'help' command doesnt work

Post by kgschlosser » Sun Jan 15, 2017 4:56 am

thats funny... LOL.
i was keying my answer to you about what your problem most likley is.. and you gone and figured it out

HOO-RA!
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 4165
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: in a 'Python Shell' the 'help' command doesnt work

Post by kgschlosser » Sun Jan 15, 2017 5:00 am

at the present moment i am writing a replacement for the pywin32 version to add to the core. and not just the xmplay plugin.. i do not know how many plugins use dde and I know there are bound to be others. so this is a start. because of windows 10 window 8 we can't be running a version of pywin32 that was made in 2010. because that is when the last version was made that dde worked in.

and actually this is now the second thing i have had to fix with pywin32. the big issue is it seems the developer(s) don't like to fix issues with it.. but is is almost a necessity to have for communicating with windows.
If you like the work I have been doing then feel free to Image

Diz
Experienced User
Posts: 121
Joined: Tue Jan 10, 2017 4:49 pm

Re: in a 'Python Shell' the 'help' command doesnt work

Post by Diz » Sun Jan 15, 2017 5:11 am

hey, im on a roll here! ive also sussed out my beta crashing issue but it seems to be pycrusts fault. i use the pycrust shell to get help on commands for scripting macros. so to recreate this issue is very simple:

open a pycrust shell
type 'help()'

at this point the mouse pointer turns to a busy timer and stays that way until you type 'quit' to leave help mode.
but if you forget to type quit or if you are done with the pycrust shell and just close it then its an instant crash everytime. i think this must have been my issue all along because i am new to the python language so i was needing lots of help on commands.

also i actually still us windows xp! so do you plan to keep it xp compatible? lol :)

pearbear
Experienced User
Posts: 150
Joined: Mon Apr 02, 2012 10:28 pm
Contact:

Re: in a 'Python Shell' the 'help' command doesnt work

Post by pearbear » Sun Jan 15, 2017 5:33 am

Diz wrote:hey, im on a roll here! ive also sussed out my beta crashing issue but it seems to be pycrusts fault. i use the pycrust shell to get help on commands for scripting macros. so to recreate this issue is very simple:

open a pycrust shell
type 'help()'

at this point the mouse pointer turns to a busy timer and stays that way until you type 'quit' to leave help mode.
but if you forget to type quit or if you are done with the pycrust shell and just close it then its an instant crash everytime. i think this must have been my issue all along because i am new to the python language so i was needing lots of help on commands.
For me(Win 7 64 bit, EG 0.5.0-beta5 and WIP-2017.01.14-09.39.20) I get the busy timer which remains even if I close the pycrust window but it doesn't crash, everything seems to still be working correctly other than the mouse pointer being different. However, if I open pycrust and type help() again after doing that then EG locks up.

User avatar
kgschlosser
Site Admin
Posts: 4165
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: in a 'Python Shell' the 'help' command doesnt work

Post by kgschlosser » Sun Jan 15, 2017 1:41 pm

well pycrust is the "flakiest" python shell..

I don't know if there is anything we could do to fix this issue... because so much of python wx is written in C++ and compiled already chances of a fix from the EG side of things is probably not gonna happen... and to be honest the team over at wx are not all that motivated to fix bugs either.
If you like the work I have been doing then feel free to Image

Post Reply