Trying to add Show QR Code action raises an error

This is where you report any issues if you are running a beta version of EventGhost
Forum rules
To submit a possible bug report please follow this template

Version: 0.5 beta 2 (the version you are running)
Traceback: Traceback (most recent call last):
File "<SOME_EVENTGHOST_FILE.py>", line 10, in <module>
SOME_FUNCTION()
File "<SOME_EVENTGHOST_FILE.py>", line 4, in SOME_EVENTGHOST_MODULE
SOME_FUNCTION()

copy and past any traceback information from the log if there is no traceback put NONE

Event:
Main.test.0.1.2.3.4.5.6.7.8
1
2

in the Event field you will want to put the event that was triggered just prior to the traceback occurring, if there is personal data put PERSONAL DATA if there was no traceback or no event triggered right before the traceback put NO EVENT

Description: if you have the ability to replicate the issue then put in here a description of what you are doing to create the problem.

Screen Shots: screen shots of the error and any events/macros/acrions that were run before the issue or screen shots of the problem

Files: any files that may be used to isolate where the issue is. something like the log.txt file would go here

if you provide the above information before hand it will greatly speed up the diagnostic process. we will not have to ask for the bits and pieces. And also having a well formatted Bug Report filled out will get answered sooner then the ones that aren't
Post Reply
User avatar
Boolean263
Plugin Developer
Posts: 81
Joined: Sat Aug 12, 2017 7:52 pm
Location: Ottawa, Canada
Contact:

Trying to add Show QR Code action raises an error

Post by Boolean263 » Sun Sep 17, 2017 8:37 pm

I don't know if this is a beta-specific bug, but since I'm running the beta (actually RC) version, thought I should post it here.

I can't add a "Show QR Code" action to a macro. When I select it from the Add Action dialog and click OK, I get the following error dump (this is with debugging information enabled):

Code: Select all

Traceback (most recent call last) (0.5.0-rc4):
  File "E:\Program Files (x86)\EventGhost\eg\Classes\TaskletDialog.py", line 162, in ProcessingTask
    self.Configure(*args, **kwargs)
  File "E:\Program Files (x86)\EventGhost\eg\Classes\ConfigDialog.py", line 106, in Configure
    treeItem.Configure(*args)
  File "E:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 80, in Configure
    return self.executable.Configure(*args)
  File "E:\Program Files (x86)\EventGhost\plugins\System\__init__.py", line 1646, in Configure
    textWidth = 105
  File "E:\Program Files (x86)\EventGhost\eg\Classes\SmartSpinIntCtrl.py", line 61, in __init__
    textWidth = textWidth
  File "E:\Program Files (x86)\EventGhost\eg\Classes\SmartSpinNumCtrl.py", line 61, in __init__
    self.ctrl = self.CreateCtrl(int(not isinstance(value, (int, float))))
  File "E:\Program Files (x86)\EventGhost\eg\Classes\SmartSpinNumCtrl.py", line 72, in CreateCtrl
    **self.kwargs
  File "E:\Program Files (x86)\EventGhost\eg\Classes\SpinNumCtrl.py", line 89, in __init__
    numCtrl.SetValue(value)  # To avoid bug in NumCtrl
  File "wx\lib\masked\numctrl.pyc", line 1281, in SetValue
  File "wx\lib\masked\numctrl.pyc", line 1604, in _toGUI
ValueError: value 0 is below minimum value of control
Windows 10 Home, version 1703, build 15063.540 · EventGhost 0.5.0-rc4 · wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.

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

Re: Trying to add Show QR Code action raises an error

Post by kgschlosser » Mon Sep 18, 2017 3:05 am

I have a question. is the qrcode something that you actually use or is it something that you tested to see what it does. because in all honesty i do not see what the point to it is. But i will have a look see at it.
If you like the work I have been doing then feel free to Image

User avatar
Boolean263
Plugin Developer
Posts: 81
Joined: Sat Aug 12, 2017 7:52 pm
Location: Ottawa, Canada
Contact:

Re: Trying to add Show QR Code action raises an error

Post by Boolean263 » Tue Sep 19, 2017 12:51 am

Which answer will encourage you to fix it? :lol:

I've been trying to test every action that I can as I go about documenting the various plugins. (System was a beast, just because it has so many actions available.) This is how I discovered that Show QR Code is broken.

Somebody obviously saw a point in having that action, because they created it, and someone (possibly the same person, possibly not) decided it was useful enough to include in a core plugin. So I'd advise caution before tearing it out.

But if you are looking at removing unneeded actions, you should also look at Display Image vs Show Picture. To me, they're the same thing, I don't see a good reason why they're both needed. Show Picture has fewer features, so perhaps it can be cut.
Windows 10 Home, version 1703, build 15063.540 · EventGhost 0.5.0-rc4 · wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.

User avatar
topix
Experienced User
Posts: 417
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

Re: Trying to add Show QR Code action raises an error

Post by topix » Mon Sep 25, 2017 10:40 am

To fix it do the following:
In eg/Classes/SmartSpinNumCtrl.py change line 43 from

Code: Select all

self.initValue = 0.0
to

Code: Select all

self.initValue = value

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

Re: Trying to add Show QR Code action raises an error

Post by kgschlosser » Wed Oct 04, 2017 11:19 pm

this problem is not in SmartSpinNumCtrl. it is actually in SpinNumCtrl.


because the control sets the value at 0 when it creates the instance of the control and then sets the parameters after that and then sets the value. if you specify a min value higher then 0 the value error occurs.

but if we set the value before the parameters and the default min value is 0.0 and the value is below that. we have the same issue. I have corrected this and will have it added to the core code. but attached is the SpinNumCtrl.py file that has the proper solution.

Thanks for reporting this.
Attachments
SpinNumCtrl.py
(5.59 KiB) Downloaded 43 times
If you like the work I have been doing then feel free to Image

User avatar
Luca Brasi
Experienced User
Posts: 262
Joined: Sat Oct 11, 2008 12:39 pm

Re: Trying to add Show QR Code action raises an error

Post by Luca Brasi » Thu Oct 05, 2017 5:47 am

This worked for me for the same error with the Pusle-Eight Hdmi CEC 1.1b plugin.
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

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

Re: Trying to add Show QR Code action raises an error

Post by kgschlosser » Thu Oct 05, 2017 9:00 am

yup it should
If you like the work I have been doing then feel free to Image

Post Reply