This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Weather script 0.62/0.63 doesnt work, maybe html code change

Old posts that have not been replied to for several years.
T
Thorne^

Post by Thorne^ »

Hello!

Weather script 0.62/0.63 doesnt work, maybe html code change
Y
Ycarus

Post by Ycarus »

Yes there is a problem...
So now there is a new version :smile:
In this new version you can also choose to display °C and °F and also mph and km/h :smile:

You can download it here :
http://xerus.dns2go.com:81/~yannick/htm ... tit&lid=29

Ycarus
yews@ifrance.com
http://yews.fr.st/
T
Thorne^

Post by Thorne^ »

Hello !

I tried your new version, and got strange results. Added a city in germany to default

.wz -d Braunschweig
Error msg from the bot in dcc:
Tcl error [pub_iws]: syntax error in expression "( * 8) / 5"

.wz Hannover
Tcl error [pub_iws]: syntax error in expression "( * 8) / 5"

no city name as result, just the zip code:
«Thorne^» .wz 90210
«@Tuxedo{E}» Weather 90210: AM Clouds / PM Sun, 22°C/73°F Wind : From the West Southwest at 16 km/h - 10 mph
«@Tuxedo{E}» Humidity: 53% Barometer: 29.92 inches and steady. Sun Index: 10 Very High ()

Error in dcc:
Tcl error [pub_iws]: syntax error in expression "( * 1.8) + 32"


«Thorne^» .wz New York
«@Tuxedo{E}» ---===> Weather Service <===---
«@Tuxedo{E}» Weather new%20york: Partly Cloudy, 16°C/62°F Wind : From the Northeast at 4 km/h - 3 mph
«@Tuxedo{E}» Humidity: 78% Barometer: 29.69 inches and steady. Sun Index: 1 Minimal ()

Error in dcc:
Tcl error [pub_iws]: syntax error in expression "( * 1.8) + 32"


«Thorne^» .wz London uk
no reply, but error in dcc:
Tcl error [pub_iws]: syntax error in expression "( * 8) / 5"

debugiwsfile

***** International Weather Script (IWS) by Ycarus *****
IWS version : 0.64 - Eggdrop version : 1061000 - TCL version : 8.3
Platform : unix - Machine : i686 - OS : Linux - Version : 2.2.19
Language : us
The user ask for : London uk
The link we use is : http://www.weather.com:80/weather/local/UKXX0085
The tmp file is : tmpweatherinfo.txt
var : weather : - temp : - wind : - humidity : - barometer : - uv : - meteoprob :
lng us - defuser 1 - alwaysdebugon 0
display look :
"02 ---===> Weather Service <===---02"
"02 §Weather§ %nameofcity%: 02 %weather%, %temp%§°C§ 02§Wind§ : 02 %vent%"
"02 §Humidity§: 02 %humidite% 02§Barometer§: 02 %pression%. 02§Sun Index§: 02 %indUV% (%qtUV%)"

display prev look :
"02 §Forecast§ %nameofcity%:02"
"%weather1%"
"%weather2%"
"%weather3%"

separator : - - chan actif : * - notice : #name1 - channel : * - pv : #name2
---------- iwstmpfile : tmpweatherinfo.txt ----------------
<html><head><title>Apache Tomcat/4.0.3 - Error report</title><STYLE><!--H1{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} BODY{font-family : sans-serif,Arial,Tahoma;color : black;background-color : white;} B{color : white;background-color : #0086b2;} HR{color : #0086b2;} --></STYLE> </head><body><h1>Apache Tomcat/4.0.3 - HTTP Status 302 - Moved Temporarily</h1><HR size="1" noshade><p><b>type</b> Status report</p><p><b>message</b> <u>Moved Temporarily</u></p><p><b>description</b> <u>The requested resource (Moved Temporarily) has moved temporarily to a new location.</u></p><HR size="1" noshade></body></html>

------------ End of the file -----------
On 2002-06-15 10:15, Ycarus wrote:
Yes there is a problem...
So now there is a new version :)
In this new version you can also choose to display °C and °F and also mph and km/h :)

You can download it here :
http://xerus.dns2go.com:81/~yannick/htm ... tit&lid=29

Ycarus
yews@ifrance.com
http://yews.fr.st/
T
Thorne^

Post by Thorne^ »

Oh and i forget the script doesnt work for almost every city in every country.
And commands like .wz es Madrid dont work.
The errors in dcc, are this line in the script

set vent "$commentvent [expr ($vent * 8) / 5] km/h - $vent mph"

set temp "$temp°C/[expr ($temp * 1.8) + 32]°F"

On 2002-06-15 16:44, Thorne^ wrote:
Hello !

I tried your new version, and got strange results. Added a city in germany to default

.wz -d Braunschweig
Error msg from the bot in dcc:
Tcl error [pub_iws]: syntax error in expression "( * 8) / 5"

.wz Hannover
Tcl error [pub_iws]: syntax error in expression "( * 8) / 5"

no city name as result, just the zip code:
«Thorne^» .wz 90210
«@Tuxedo{E}» Weather 90210: AM Clouds / PM Sun, 22°C/73°F Wind : From the West Southwest at 16 km/h - 10 mph
«@Tuxedo{E}» Humidity: 53% Barometer: 29.92 inches and steady. Sun Index: 10 Very High ()

Error in dcc:
Tcl error [pub_iws]: syntax error in expression "( * 1.8) + 32"


«Thorne^» .wz New York
«@Tuxedo{E}» ---===> Weather Service <===---
«@Tuxedo{E}» Weather new%20york: Partly Cloudy, 16°C/62°F Wind : From the Northeast at 4 km/h - 3 mph
«@Tuxedo{E}» Humidity: 78% Barometer: 29.69 inches and steady. Sun Index: 1 Minimal ()

Error in dcc:
Tcl error [pub_iws]: syntax error in expression "( * 1.8) + 32"


«Thorne^» .wz London uk
no reply, but error in dcc:
Tcl error [pub_iws]: syntax error in expression "( * 8) / 5"

debugiwsfile

***** International Weather Script (IWS) by Ycarus *****
IWS version : 0.64 - Eggdrop version : 1061000 - TCL version : 8.3
Platform : unix - Machine : i686 - OS : Linux - Version : 2.2.19
Language : us
The user ask for : London uk
The link we use is : http://www.weather.com:80/weather/local/UKXX0085
The tmp file is : tmpweatherinfo.txt
var : weather : - temp : - wind : - humidity : - barometer : - uv : - meteoprob :
lng us - defuser 1 - alwaysdebugon 0
display look :
"02 ---===> Weather Service <===---02"
"02 §Weather§ %nameofcity%: 02 %weather%, %temp%§°C§ 02§Wind§ : 02 %vent%"
"02 §Humidity§: 02 %humidite% 02§Barometer§: 02 %pression%. 02§Sun Index§: 02 %indUV% (%qtUV%)"

display prev look :
"02 §Forecast§ %nameofcity%:02"
"%weather1%"
"%weather2%"
"%weather3%"

separator : - - chan actif : * - notice : #name1 - channel : * - pv : #name2
---------- iwstmpfile : tmpweatherinfo.txt ----------------
<html><head><title>Apache Tomcat/4.0.3 - Error report</title><STYLE><!--H1{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} BODY{font-family : sans-serif,Arial,Tahoma;color : black;background-color : white;} B{color : white;background-color : #0086b2;} HR{color : #0086b2;} --></STYLE> </head><body><h1>Apache Tomcat/4.0.3 - HTTP Status 302 - Moved Temporarily</h1><HR size="1" noshade><p><b>type</b> Status report</p><p><b>message</b> <u>Moved Temporarily</u></p><p><b>description</b> <u>The requested resource (Moved Temporarily) has moved temporarily to a new location.</u></p><HR size="1" noshade></body></html>

------------ End of the file -----------
On 2002-06-15 10:15, Ycarus wrote:
Yes there is a problem...
So now there is a new version :)
In this new version you can also choose to display °C and °F and also mph and km/h :)

You can download it here :
http://xerus.dns2go.com:81/~yannick/htm ... tit&lid=29

Ycarus
yews@ifrance.com
http://yews.fr.st/
Y
Ycarus

Post by Ycarus »

The error is not a error from the script... not really... The weather.com site change all html code but not all at the same time... So when they change this code you have this : The requested resource (Moved Temporarily) has moved temporarily to a new location.

But now all seems to work quite well :smile:

There is some bugs (like the script should display the error and not the TCL code,...) but all should work now :smile:

I will make a new version tomorrow :smile:

Ycarus
yews@ifrance.com
http://yews.fr.st/

<font size=-1>[ This Message was edited by: Ycarus on 2002-06-16 14:57 ]</font>
T
Thorne^

Post by Thorne^ »

Hello !

Well the error msg's are first gone, but they are back (wonder why) and the script gets no weather infos, i tried
many cities/countrys

answer is always the same:
Sorry we don't have the weather of the city you ask for.
méteo : recherche ville

.wz lng city still doesnt work.

Your Script works only if i type:

.wzf cityname OR .wz prev cityname


I downloaded your tcl today again, meteo.tcl file date is 17.6.2002
I compared the files with Ultraedit, nothing changed.

I hope your tcl will work soon, cuz i like it.
On 2002-06-16 14:45, Ycarus wrote:
The error is not a error from the script... not really... The weather.com site change all html code but not all at the same time... So when they change this code you have this : The requested resource (Moved Temporarily) has moved temporarily to a new location.

But now all seems to work quite well :smile:

There is some bugs (like the script should display the error and not the TCL code,...) but all should work now :smile:

I will make a new version tomorrow :smile:

Ycarus
yews@ifrance.com
http://yews.fr.st/

<font size=-1>[ This Message was edited by: Ycarus on 2002-06-16 14:57 ]</font>
<font size=-1>[ This Message was edited by: Thorne^ on 2002-06-17 10:16 ]</font>

<font size=-1>[ This Message was edited by: Thorne^ on 2002-06-17 10:18 ]</font>
Y
Ycarus

Post by Ycarus »

Yes, there is some error with the redirection... (301 & 302)

Now all work well... But I will release this new version tomorrow. I want to test it a little more and it's 22:20 in France, so I have to go to bed :smile: So the working new version, with a lot of bugfixes will be released tomorrow :smile: (not before 13:00 in France)

Ycarus
yews@ifrance.com
http://yews.fr.st/
h
hypo

Post by hypo »

hey Ycarus,
the weird thing is that the command !weather city, country don't work anymore .. only the !forecast city, country works.

is there something new we have to know about this ? =)

thx for your help.
Y
Ycarus

Post by Ycarus »

You can download the new version of the script, with no more bugs (I hope) here :
http://xerus.dns2go.com:81/~yannick/htm ... tit&lid=29

Ycarus
yews@ifrance.com
http://yews.fr.st/
E
Epidural

Post by Epidural »

I still get the same error with version 65:

01:53] Tcl error [pub_iws]: syntax error in expression "( * 1.:cool: + 32"

The bot asked to mail a debug file, but none was produced. Sorry.

Ep

<font size=-1>[ This Message was edited by: Epidural on 2002-06-19 13:53 ]</font>
Y
Ycarus

Post by Ycarus »

I hope this time it's ok. I have released the 0.651 version :smile:

You can download it here :
http://xerus.dns2go.com:81/~yannick/htm ... tit&lid=29

If you always have a problem, please tell me what you type :smile:

Ycarus
yews@ifrance.com
http://yews.fr.st/
E
Epidural

Post by Epidural »

Hi,

I downloaded your .651 and get the following:
when I type
!weather toronto canada
[05:37] Tcl error [pub_iws]: syntax error in expression "( * 1.8) + 32"

!wz toronto, on canada
[05:37] Tcl error [pub_iws]: syntax error in expression "( * 1.8) + 32"

!weather toronto, canada
[05:37] Tcl error [pub_iws]: syntax error in expression "( * 1.8) + 32"

!weather toronto, ontario, canada
Sorry we don't have the weather of the city you ask for.

Am I doing something wrong? This script did work fine for me before and all of a sudden started giving errors. It worked very well! I had .64.

Ep
Y
Ycarus

Post by Ycarus »

It's why there is now the 0.652 version :smile:
I'm really sorry, I've never see this bug before I test some other city in USA & Canada... But now all should really work well, with really no more bugs :smile:

you can always download it at the same link :
http://xerus.dns2go.com:81/~yannick/htm ... tit&lid=29

Ycarus
yews@ifrance.com
http://yews.fr.st/
E
Epidural

Post by Epidural »

Works perfect! Thanks for the update!

Cheers!

Ep
D
Darude

Post by Darude »

You can also try the weather script on http://eggnet.warpzone.org, I've been using it for a while now and i never had any problem with it...
Locked