PDA

View Full Version : TyTool#5 stops after putting clocks back / time different



nokia
11-03-2002, 05:12 PM
I haven't tried to extract for a while but I tried today and Tytool#5 reported that it could not get the list...

Ready...
Reading list from the server...
Clear Now Showing List...
Connecting to '192.168.0.200'
Connected...
Getting NowShowing data...
Sorry.. Could not obtain the list.Ready...

When I Telnet'd to the box I saw the following....

SERVER: We got a message! buf = 'SHOWING'
syntax error in expression "*60*60"
while executing
"expr $tz*60*60"
(procedure "get_tzoffset" line 31)
invoked from within
"get_tzoffset $setuptz $daylightsavings"
(procedure "init_db" line 54)
invoked from within
"init_db"
(file "./NowShowing.tcl" line 455)
Waiting for an incomming connection!

I'm assuming that this problem has been caused by the changein daylight savings - anybody know what the solution is....?

Thanks in advance,
Nick

JasonJLee
11-12-2002, 11:09 AM
Same problem in the UK with a SA Tivo, running tytool5r2..

No idea how to fix it.

Tried a reboot, and made no difference.

Hopefully someone will post with an explination.

J

jdiner
11-12-2002, 03:53 PM
It is a UK only problem. Only UK users have reported it. I have no idea why it is dieing. I don't have a UK tivo. I can't even test code options to see what happens.

We either need to find someone that has a UK tivo and a basic knowledge of tcl to go through the code and figure it out. Or someone has to give me temp access to theirs via the internet.

I am at a stand still until I can look directly into what is going on.

So either someone else has to step up, or it will continue to just sit around with the problem.

--jdiner

Spod
11-12-2002, 05:10 PM
j,

If you can come in from a fixed IP address and let me know i'll put the requisite hole in my firewall. ( I know you are a busy man! )

Rgds,

R.

rob dot bellis at up4it dot com

davids66
11-12-2002, 06:11 PM
I can make an uneducated guess at what the problem is based on:

syntax error in expression "*60*60"
while executing
"expr $tz*60*60"
(procedure "get_tzoffset" line 31)

I would bet that for whatever reason the mfstz variable is not properly set. If it was zero, then it would be trying to get a negative index from tzlist which would be undefined.

The workaround that I would do would be to add a line to set your timezone. Mine is EST so mine would be:

set tz "-5"

Add that to proc get_tzoffset in the proper place and the rest of the computation should be fine. The line that it blew up from was trying to calculate the offset in seconds ($tz*60*60) but it looks like $tz which is the "Hours of Offset" was undefined.

Make the following change to NowShowing.tcl after you make a backup. You will need to add the one line "set tz "-5" where -5 is your proper timezone offset.

proc get_tzoffset {mfstz dst} {
if { $mfstz < 0 } {
set tz $mfstz
} else {
set tzlist "-5 -6 -7 -8 -9 -10 0 1 2 3 4 5 6 7 8 9 10 11 12 -1 -2 -3 -4 -11 -12"
set tz [lindex $tzlist [expr $mfstz - 1]]
}

# This is the added line - make sure you put in your proper timezone offset
set tz "-5"

if { $dst == 2 || $dst == "" } {
...

Let me know if this actually works. haha

No warranties either expressed or implied are made for this modification. :)

David

jdiner
11-13-2002, 02:00 AM
Originally posted by Spod
j,

If you can come in from a fixed IP address and let me know i'll put the requisite hole in my firewall. ( I know you are a busy man! )

Rgds,

R.

rob dot bellis at up4it dot com

Many thanks. Check your PM I just sent you the information on my static IP.

Once I can get in it should only take an hour or so to fix it.

--jdiner

FreydNot
11-13-2002, 02:48 AM
Originally posted by jdiner
It is a UK only problem. Only UK users have reported it. I have no idea why it is dieing. I don't have a UK tivo. I can't even test code options to see what happens.


I saw this same problem on my USA SA box. A reboot seemed to fix it.

JasonJLee
11-13-2002, 04:35 PM
davids66:

I know no TCL as I stated before, but looking at what you posted, I though, what the hell..

Tried what you said, and got the same error as before.

Looking at the code, the code you suggested is the else clause of an if else construct...

proc get_tzoffset {mfstz dst} {
if { $mfstz < 0 } {
set tz $mfstz
} else {
set tzlist "-5 -6 -7 -8 -9 -10 0 1 2 3 4 5 6 7 8 9 10 11 12 -1 -2 -3 -4 -11 -12"
set tz [lindex $tzlist [expr $mfstz - 1]]
}

I tried the line you suggested in the if part.. so...

if { $mfstz < 0 } {
set tz $mfstz
set tz "-5"
} else {

This produces a working nowshowing.tcl script.. I don't care if the dates/times are off, I just want the recordings..

Why would the original code not be working?

Well for this fix to work, the

set tz &mfstz

must not be setting tz I would guess, or at least not to a value that the later *60*60 can get on with..?

Not sure really, but maybe the fact that this works sheds some light on it? If I could add code to output messages to the screen I could maybe at least show the flow of the code, or of the input variables..but I don't know how to do that!

Jdiner:

I could reconfig my router to let you in, if you didn't have any luck with the other guy.. Let me know.

JasonJLee
11-13-2002, 05:10 PM
OK.

Found the puts command..

inserting a puts $tz

If I leave the

set $tz "-5"

It outputs -5

without it outputs nothing.

puts $mfstz
puts $dst

also outputs nothing..

There seems to be no code path for $mfstz to be "" whereas there is for dst = "" later on..

Maybe something like...
if mfstz$ = ""

set tz$ "-5" or somesuch???

Anyway, offer still stands jdiner..

davids66
11-13-2002, 10:29 PM
"I don't care if the dates/times are off, I just want the recordings.."


JasonJLee, if you are in the UK, why don't you just put in the correct hour offset for your region. Mine was -5 for EST and you are probably 5 hours later so your offset should be close to 0. Just set tz "0" and if it is off just plug in the proper number.

If you never leave the timezone then it doesn't matter if it is hard coded. For me, I just need to be sure that $dst is properly set for daylight savings time.

David

jdiner
11-14-2002, 12:32 AM
I got access to 1 machine. It was a UK tivo but there was no problem on it. That I don't get. It pulls the "do you use day light savings time" from the MFS and then just does some simple math on it.

I do believe that some people here are right. Just edit the NowShowing.tcl and change the value to a hard coded default. The times will then be wrong but the script will run.

I have no idea what suddenly happened to the UK Tivo to smash it. If no on else can make the change I will do so and post a new version...

--jdiner

JasonJLee
11-14-2002, 10:30 AM
Jdiner:

If you want access to my machine, let me know.

I would like get to the bottom of the problem.

It seems from your last post confirms what I discovered, the mfstz variable that is being passed into the subroutine is empty in my case..

I've tried different NowShowing.tcl 's, but the last release I found of tytool had no NowShowing.tcl inside it.

Could you post up a complete .zip with what is the current NowShowing inside?

I did find one done by someone else (Enigma?) but it could be wrong I guess.

What worries me is that other UK users are fine.

So

a) I have a 'bad' NowShowing
b) I have a screwed up Tivo(I have rebooted when testing)

If I get a .zip file directly from you that rules out a screwed up NowShowing.

davidblack
11-17-2002, 01:54 AM
if someone could post a nowshowing.tcl that works on a uk tivo it would be great...

no success here modifying the original nowshowing..........


Thanks
David

JasonJLee
11-17-2002, 08:24 AM
David,

Attached is my edited file. It's set for 0, which may or may not be right, I haven't checked..

Should be considered temporary fix, so keep this thread on your radar.

But it does work with tytool5r2, and does delete shows.

Remember to transfer it in binary mode if your using ftp...

and chmod it...

Best of luck.

davidblack
11-17-2002, 03:11 PM
Thanks but doesn't work here

Still getting:

Waiting for an incomming connection!
SERVER: We got a message! buf = 'SHOWING'
syntax error in expression "*60*60"
while executing
"expr $tz*60*60"
(procedure "get_tzoffset" line 35)
invoked from within
"get_tzoffset $setuptz $daylightsavings"
(procedure "init_db" line 54)
invoked from within
"init_db"
(file "./NowShowing.tcl" line 455)
Waiting for an incomming connection!

JasonJLee
11-17-2002, 06:39 PM
DavidBlack,

I can't figure out why it isn't working for you. Either

a) your problem is very slightly different in terms of what is failing to be passed in.

b) you didn't replace the file properly. (No Offense ment)

I've edited the file again to place the set tz "0" outside of the if statement. This way its set no matter if the problem is slightly different.

I always delete Nowshowing.tcl and then ftp the file on. Then if its there, it has to be the new file.

I hope it works. It works here, but thats all I can say for it.

J

davids66
11-18-2002, 12:16 PM
I looked at the code which has the following:

proc get_tzoffset {mfstz dst} {
if { $mfstz < 0 } {
set tz $mfstz
set tz "0"
} else {
set tzlist "-5 -6 -7 -8 -9 -10 0 1 2 3 4 5 6 7 8 9 10 11 12 -1 -2 -3 -4 -11 -12"
set tz [lindex $tzlist [expr $mfstz - 1]]
}
if { $dst == 2 || $dst == "" } {


the reason it would work for some and not others is that if $mfstz is 0 then if would fail the condition and execute the else statements. It would be unable to set tz because it is looking for the index offset of a negative number ($mfstz - 1) which is undefined.

try this code:

proc get_tzoffset {mfstz dst} {
if { $mfstz < 0 } {
set tz $mfstz
} else {
set tzlist "-5 -6 -7 -8 -9 -10 0 1 2 3 4 5 6 7 8 9 10 11 12 -1 -2 -3 -4 -11 -12"
set tz [lindex $tzlist [expr $mfstz - 1]]
}

set tz "0"

if { $dst == 2 || $dst == "" } {


Then use trial and error and change the "0" value to get your proper timezone offset if it is off after this change.

David

JasonJLee
11-18-2002, 12:54 PM
davids66:

My last code change was just as you posted.(appart from I think I left the previous line I added in, but it makes no difference)

No idea if it worked for davidblack.. I hope so.


J

davidblack
11-22-2002, 01:17 AM
worked!!

thanks guys you are legends

phedders
12-16-2002, 01:36 AM
Is the problem not that in the UK we are on GMT so the timezone offset is 0 and that in TCL maybe 0 is undefined and you can't maybe you can't multiply by it? (ie 0x60x60)

I don't know TCL so this is a guess.

davids66
12-16-2002, 09:09 AM
phedders;

Yes, there is a logic error in the original code for those who are on GMT. I described the problem on my post of 11-18-2002 but the proper fix to the original code would be to change only this one line:

if { $mfstz < 0 } {

change it to:

if { $mfstz < 1 } {

Then no additional modifications are needed.

With this change, when $mfstz = 0, then the following is properly executed:

set tz $mfstz

And tz is properly made 0

Without this change, when $mfstz = 0, the the following tries to execute:

set tz [lindex $tzlist [expr $mfstz - 1]]

But you can't get the index offset of a negative number ($mfstz - 1) which is undefined.

David

phedders
12-17-2002, 06:29 AM
Originally posted by davids66
phedders;

if { $mfstz < 0 } {

change it to:

if { $mfstz < 1 } {



Hmm didn't work for me.

Putting in a "set tz 0" did work though...
--
Paul

scooper
12-18-2005, 06:11 PM
I've recently had a hard drive failure, and had to reinstall ... I came across this thread when I discovered TYtool stopped working since the clocks went back/forward whatever it was.

The error reported was something about "tz*60*60"

I've patched up the code to get around the problem and attached NowShowing.tcl

Hope this of use to someone - I could not see a more recent fix for the UK guys.

Jamie
12-18-2005, 06:35 PM
I've recently had a hard drive failure, and had to reinstall ... I came across this thread when I discovered TYtool stopped working since the clocks went back/forward whatever it was.

The error reported was something about "tz*60*60"

I've patched up the code to get around the problem and attached NowShowing.tcl

Hope this of use to someone - I could not see a more recent fix for the UK guys.The tserver from this (http://www.dealdatabase.com/forum/showthread.php?t=39487) post does not require a NowShowing.tcl and works fine on UK tivos in either BST or GMT. I thought the latest tytools distribution used this version, but I'm not certain as I haven't checked.

Teraflop
12-18-2005, 07:02 PM
I got a similar error, but it had to do with the Time Zone. Anybody know how to correct it? Here is what Telnet came back with:

Only-TiVo# cd /var/hack
Only-TiVo# chmod +x NowShowing.tcl tserver
Only-TiVo# ./tserver
Doing the Lowest PriorityFix...
Waiting for an incoming connection!
SERVER: We got a message! buf = 'SHOWING'
invalid attribute: TimeZone
while executing
"dbobj $setup get TimeZone"
("uplevel" body line 5)
invoked from within
"uplevel $body"
invoked from within
"transaction {uplevel $body}"
(procedure "RetryTransaction" line 5)
invoked from within
"RetryTransaction {
set setup [db $db open /Setup]

# set defrecquality [dbobj $setup get RecordQuality]
set setuptz [dbobj $setup ..."
(procedure "init_db" line 45)
invoked from within
"init_db"
(file "./NowShowing.tcl" line 480)


:confused:

mrdizzy
12-18-2005, 08:37 PM
I got a similar error, but it had to do with the Time Zone. Anybody know how to correct it?

Yes - use the tserver linked from the post above yours. There is no need for a separate NowShowing.tcl file any more. All the timezone problems go away.

Teraflop
12-20-2005, 10:10 PM
You say that the TServer doen't need a NowShowing.tcl file too? I downloaded the mfs-utils_src-20050604.tar one and it contains a Now Showing C file and a Now Showing.tcl file as well as a TServer C file. Which should I use and should it or (they) be put in the VAR/HACK folder on my TiVo HDD? Can I assume that I should remove the other TServer and NowShowing.tcl files? What file will execute the program on my PC? Do I still use the TyTool9r18 app file to execute it? THANX for your help.

cheer
12-21-2005, 12:39 AM
The tserver from this (http://www.dealdatabase.com/forum/showthread.php?t=39487) post does not require a NowShowing.tcl and works fine on UK tivos in either BST or GMT. I thought the latest tytools distribution used this version, but I'm not certain as I haven't checked.
The new 10R1 release does include the above version of tserver that doesn't require the NowShowing.tcl, but evidently there's an issue with the PPC version of tserver in that archive; dunno if JD has fixed that yet.

cheer
12-21-2005, 12:42 AM
You say that the TServer doen't need a NowShowing.tcl file too? I downloaded the mfs-utils_src-20050604.tar one and it contains a Now Showing C file and a Now Showing.tcl file as well as a TServer C file. Which should I use and should it or (they) be put in the VAR/HACK folder on my TiVo HDD? Can I assume that I should remove the other TServer and NowShowing.tcl files? What file will execute the program on my PC? Do I still use the TyTool9r18 app file to execute it? THANX for your help.
Yes, the tserver does not need NowShowing.tcl. You just want the tserver executable. Where you put it is up to you; I don't keep my hacks in /var, but if that's where you had put your old tserver, feel free to put the new one there. Yes, remove the old one and the NowShowing.tcl. On your PC you can use TyTool9R18, although the new version (10R1) is now available.

Teraflop
12-21-2005, 08:44 AM
I guess what I was asking was, which file should I put in my VAR/HACK directory to replace the old Tserver and NowShowing.tcl files? I put the TSERVER C file and it said it was a directory. Sorry, but you are talking to someone who is really just getting into hacking TiVos and using a LINUX interface. Please give more deatils. THANX

cheer
12-21-2005, 09:11 AM
I guess what I was asking was, which file should I put in my VAR/HACK directory to replace the old Tserver and NowShowing.tcl files? I put the TSERVER C file and it said it was a directory. Sorry, but you are talking to someone who is really just getting into hacking TiVos and using a LINUX interface. Please give more deatils. THANX
You want the file just called "tserver." Not sure how else to explain it.

mrdizzy
12-21-2005, 03:22 PM
Also, pleae don't fix your TyTool version 5 installation because it is 5 versions out of date. Get the new version 10 instead, from the top thread of this forum. JD has now put up 10r2 which has the correct tserver.