Page 1 of 1

[FIXED] FHZ 1300

Posted: Wed Aug 27, 2008 5:54 pm
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!

Re: FHZ 1300

Posted: Wed Aug 27, 2008 7:10 pm
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.. :?

Re: FHZ 1300

Posted: Thu Aug 28, 2008 7:54 am
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'.

Re: FHZ 1300

Posted: Thu Aug 28, 2008 2:29 pm
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

Re: FHZ 1300

Posted: Tue Sep 23, 2008 6:48 pm
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".

Re: [OPEN] FHZ 1300

Posted: Sat Sep 27, 2008 5:07 pm
by Bitmonster
The latest beta should work now.