broadcast plugin error message

If you have a question or need help, this is the place to be.
Post Reply
V_J
Experienced User
Posts: 237
Joined: Tue Mar 04, 2014 9:00 am

broadcast plugin error message

Post by V_J » Sun Apr 12, 2020 6:24 am

Hello!

Lomg time no see... I am getting back to event ghost and have a question regarding the broadcast plugin. When I add the plugin, it just throws an error that a value is out of range. I suspect it is the port number but it has an appropiate value. Any ideas?

Thanks

Jörg

V_J
Experienced User
Posts: 237
Joined: Tue Mar 04, 2014 9:00 am

Re: broadcast plugin error message

Post by V_J » Sun Apr 12, 2020 7:37 am

Oh, it is the broadcast plugin, the rror comes when you try to add a send action... :)

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

Re: broadcast plugin error message

Post by kgschlosser » Wed Apr 15, 2020 9:40 am

OK.. I need to see the error.
If you like the work I have been doing then feel free to Image

V_J
Experienced User
Posts: 237
Joined: Tue Mar 04, 2014 9:00 am

Re: broadcast plugin error message

Post by V_J » Wed Apr 15, 2020 1:57 pm

Steps to reach this: 1. add broadcaster plugin (settings don't matter, can be default even). 2. In a macro, select add action and select "broadcast" from the broadcaster plugin. 3. click ok

Code: Select all

Traceback (most recent call last) (0.5.0-rc6):
  File "C:\Program Files (x86)\EventGhost\eg\Classes\TaskletDialog.py", line 162, in ProcessingTask
    self.Configure(*args, **kwargs)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\ConfigDialog.py", line 106, in Configure
    treeItem.Configure(*args)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 80, in Configure
    return self.executable.Configure(*args)
  File "C:\Program Files (x86)\EventGhost\plugins\Broadcaster\__init__.py", line 222, in Configure
    portCtrl = panel.SpinIntCtrl(port, min=0, max=65535)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\ControlProviderMixin.py", line 116, in SpinIntCtrl
    return eg.SpinIntCtrl(self, -1, value, *args, **kwargs)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\SpinIntCtrl.py", line 58, in __init__
    **kwargs
  File "C:\Program Files (x86)\EventGhost\eg\Classes\SpinNumCtrl.py", line 115, in __init__
    raise MaxValueError(value, max_val)
MaxValueError: The set value  is higher then the maximum of 65535

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

Re: broadcast plugin error message

Post by kgschlosser » Wed Apr 15, 2020 10:21 pm

OK so here goes.. I am going to play.. lets see if you can locate what the problem is.


The error in the plugin is located in this block of code.

Code: Select all

    def Configure(self, command="", payload="", port=""):
        text = self.text
        panel = eg.ConfigPanel(self)

        commandCtrl = panel.TextCtrl(command)
        payloadCtrl = panel.TextCtrl(payload)
        portCtrl = panel.SpinIntCtrl(port, min=0, max=65535)
        commandlabel = panel.StaticText(text.command)
        payloadlabel = panel.StaticText(text.payload)
        portlabel =panel.StaticText(text.sendport)
        panel.sizer.Add(commandlabel,0,wx.EXPAND)
If you like the work I have been doing then feel free to Image

V_J
Experienced User
Posts: 237
Joined: Tue Mar 04, 2014 9:00 am

Re: broadcast plugin error message

Post by V_J » Thu Apr 16, 2020 2:22 pm

kgschlosser wrote:
Wed Apr 15, 2020 10:21 pm
OK so here goes.. I am going to play.. lets see if you can locate what the problem is.
:shock: :D :?
I know from the error the problem is with the SpinIntCtrl, but I have no idea why it throws the error for values that are in the range... I don't think 65535 causes an overflow, so I don't think it is interpreted as a negative number... No idea...

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

Re: broadcast plugin error message

Post by kgschlosser » Fri Apr 17, 2020 8:04 am

OK hint hint hint..

SpinIntCtrl = Spin "Integer" Control
not Spin "String" Control
If you like the work I have been doing then feel free to Image

V_J
Experienced User
Posts: 237
Joined: Tue Mar 04, 2014 9:00 am

Re: broadcast plugin error message

Post by V_J » Fri Apr 17, 2020 8:45 am

(without testing, as I'm not at the computer now)

So it is the initialization of port="" that is causing the problem as this implies port is of type string?
( Still have to get used to the lack of type-declarations in Python... )

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

Re: broadcast plugin error message

Post by kgschlosser » Fri Apr 17, 2020 4:36 pm

yessir. change that to a 1 and you should be good to go.
If you like the work I have been doing then feel free to Image

V_J
Experienced User
Posts: 237
Joined: Tue Mar 04, 2014 9:00 am

Re: broadcast plugin error message

Post by V_J » Sat Apr 18, 2020 2:47 pm

:)
Thanks! Haven't tried it yet...

Post Reply