Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

[FIXED] FHZ 1300

Found a bug in EventGhost? Report it here.
Post Reply
garbageman
Posts: 3
Joined: Sat Aug 23, 2008 9:15 pm

[FIXED] FHZ 1300

Post by garbageman »

Hello everyone!

Obviously the german part of the forum is not the most frequented place, so please forgive me for placing the same problem in two forums...

I want to control my FHZ 1300 using this great problem. But all I see in Eventghost (latest version 3.6.1430) is this error message when I try to test a command:

Traceback (most recent call last):
File "C:\Programme\EventGhost\eg\Classes\ConfigPanel.py", line 126, in OnTestButton
self.gr.switch(eg.ID_TEST)
File "C:\Programme\EventGhost\eg\Classes\UndoHandler\Configure.py", line 54, in Do
newArgs = gr.switch(*item.GetArgs())
File "C:\Programme\EventGhost\plugins\Fhz1000Pc\__init__.py", line 273, in Configure
address = self.GetAddressFromString(maskedCtrl.GetPlainValue())
File "C:\Programme\EventGhost\plugins\Fhz1000Pc\__init__.py", line 250, in GetAddressFromString
address += (int(addressString, 4) - 1)
ValueError: invalid literal for int() with base 4: '4'

Can someone advice what to do?

Thanks in advance!
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: FHZ 1300

Post by jinxdone »

Hello.

It seems there is an error in the plugin script, it's trying to store a value '4' in a base 4 integer which can only hold values from 0 to 3.

So in other words if you enter a '4' anywhere in the address field it will break. I'm not familiar with these devices so I can't really fix it since I have no clear idea what it's supposed to be doing in the first place.. :?
garbageman
Posts: 3
Joined: Sat Aug 23, 2008 9:15 pm

Re: FHZ 1300

Post by garbageman »

Okay...so wouldn't it be the solution to extend the int definition to 5? Addresses in this FHZ system are always numbers with digits from 1 to 4, so it has to be possible to enter the value '4'.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: FHZ 1300

Post by krambriw »

Hello,

I assume you quickly could try to change yourself and try and then report back if it worked. I think this is the place in the plugin (if this is the actual problem of course)

BestR Walter

Code: Select all

    def GetAddressFromString(self, addressString):
        address = 0
        for i in range(12):
            address <<= 2
            address += (int(addressString[i], 4) - 1)
        return address
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: FHZ 1300

Post by Bitmonster »

Yes, this is a bug. I have never tested codes with "4" in them. Will be fixed in the next beta. But might take some days.

Topic moved to "bug reports".
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: [OPEN] FHZ 1300

Post by Bitmonster »

The latest beta should work now.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
Post Reply