| View previous topic :: View next topic |
| Author |
Message |
Behemoth Voice
Joined: 19 May 2008 Posts: 20 Location: Mauritius
|
Posted: Sun Jan 03, 2010 2:27 pm Post subject: |
|
|
hello speechless
Happy New Year 2010 !!!
am having this in the PL :
| Code: |
[22:05:00] <(Kestrel> [22:04] Incith:Google unable to find zlib or trf package! Gzip disabled.
[22:05:00] <(Kestrel> [22:04] Incith:Google requires gzip decompression with wikipedia and Wikimedia. As a result, every article will not work for you.
|
Help me out plz...
PS: I have changed the language into 'fr'
regards
Atem _________________ Http://optix-pro.labrute.fr/
Http://ircaz.fr/
Losers Always Whine About Their Best, But Winners Go Home And F*** The Prom Queen! |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sun Jan 03, 2010 5:14 pm Post subject: |
|
|
| Behemoth wrote: | hello speechless
Happy New Year 2010 !!!
am having this in the PL :
| Code: |
[22:05:00] <(Kestrel> [22:04] Incith:Google unable to find zlib or trf package! Gzip disabled.
[22:05:00] <(Kestrel> [22:04] Incith:Google requires gzip decompression with wikipedia and Wikimedia. As a result, every article will not work for you.
|
|
This isn't actually an error as much as a warning that sometimes wikipedia/mediawiki sites using squid caches may return a gzipped reply when gzip has not been requested. This occurs quite rarely so shouldn't be that much of a concern. To support gzip you must either have zlib or Trf packages installed -OR- The commands for zlib or Trf which do the decompressing must be found. If neither of these holds true, the script turns off gzip itself. You can also, force the script to keep gzip disabled all the time and stop self-checking by changing the config option "use_gzip" to 0. This will skip the normal routines which check for zlib/Trf and afterwards will never use gzip.
| Behemoth wrote: | Help me out plz...
PS: I have changed the language into 'fr'
regards
Atem |
For all the country switches? ebay, google, wikipedia, dailymotion and youtube all have "fr" as an option.. You can also set a default french site for wikimedia if you haven't already. _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
Behemoth Voice
Joined: 19 May 2008 Posts: 20 Location: Mauritius
|
Posted: Mon Jan 04, 2010 5:14 am Post subject: |
|
|
thnkx a lot speechless...
catch u later man..
xxx _________________ Http://optix-pro.labrute.fr/
Http://ircaz.fr/
Losers Always Whine About Their Best, But Winners Go Home And F*** The Prom Queen! |
|
| Back to top |
|
 |
cg Voice
Joined: 30 Jun 2009 Posts: 8
|
Posted: Mon Jan 04, 2010 5:46 pm Post subject: |
|
|
| cg wrote: | Hi there,
I've noticed a new error today;
11:01 <@ cg> !g barney the dinosaur
[11:01] Tcl error [incith::google::public_message]: can't read "state(body)": no such variable
Has anyone else experienced this? I am using the 'w' version.
Thanks!
I apologise in advance if this has been mentioned previously. |
Hi Speechless,
Do you have an idea as to why this may be happening?
Thanks again for your time and this great script.
Cheers,
cg |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Mon Jan 04, 2010 8:22 pm Post subject: |
|
|
| cg wrote: | | cg wrote: | Hi there,
I've noticed a new error today;
11:01 <@ cg> !g barney the dinosaur
[11:01] Tcl error [incith::google::public_message]: can't read "state(body)": no such variable
Has anyone else experienced this? I am using the 'w' version.
Thanks!
I apologise in advance if this has been mentioned previously. |
Hi Speechless,
Do you have an idea as to why this may be happening?
Thanks again for your time and this great script.
Cheers,
cg |
This occurs when a certain http::code is returned that the script isn't aware of, and attempts to get a page body when the http::code given clearly would tell why there would be no page body. This could be a forbidden error (usually a 501,502,503 etc). Might be a Google sorry, but these have page bodies. The script can parse the usual 503 google sorry if it has a page body..... Maybe this time yours doesn't? The easiest way to solve this is to find in your copy of the script where it says 'variable debugnick speechles'. Change the "speechles" to your nickname your using on irc. Make sure debug variable is set to 1 allowing messages to be sent to the debugnick too. After all this .rehash your bot. Then issue a "!g barney the dinosaur" in your channel and watch for the message your bot sends you in private message. What does that message say? Try it a couple times with different queries too. Paste a series of these which work and do not, and comparing the results should indicate where the problem is.
note to all: on efnet I see tons of bots message me daily. Seeing their messages helps me debug issues within this script, so if you use efnet change it back to "speechles" (this isn't so I can find you google loli porn, animal scat fetish or anything like that, all i really care about is return code and such) and you can help me debug strange things in the future as well. join the channel mentioned next to the @efnet in the script and I can fix the issue 0sec most times..  _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
cg Voice
Joined: 30 Jun 2009 Posts: 8
|
Posted: Mon Jan 04, 2010 9:17 pm Post subject: |
|
|
Thanks for your reply
Its doing it with any !g $search that we input, all coming back with;
[14:11] Tcl error [incith::google::public_message]: can't read "state(body)": no such variable
I also did the debug change you suggested;
variable debug 1
variable debugnick cg
.. and rehash'd the bot, but it doesn't send me a private message.
I do wonder if its getting confused up with the iGoogle section of the page, as my workstation defaults to that and I don't recall ever asking it to :\
i'm in NZ, which google.com redirects to google.co.nz.
Cheers,
cg. |
|
| Back to top |
|
 |
transacid Voice
Joined: 08 Aug 2007 Posts: 12 Location: Hamburg / Germany
|
Posted: Fri Jan 08, 2010 5:48 am Post subject: |
|
|
| speechles wrote: |
This occurs when a certain http::code is returned that the script isn't aware of, and attempts to get a page body when the http::code given clearly would tell why there would be no page body. This could be a forbidden error (usually a 501,502,503 etc). Might be a Google sorry, but these have page bodies. The script can parse the usual 503 google sorry if it has a page body..... Maybe this time yours doesn't? The easiest way to solve this is to find in your copy of the script where it says 'variable debugnick speechles'. Change the "speechles" to your nickname your using on irc. Make sure debug variable is set to 1 allowing messages to be sent to the debugnick too. After all this .rehash your bot. Then issue a "!g barney the dinosaur" in your channel and watch for the message your bot sends you in private message. What does that message say? Try it a couple times with different queries too. Paste a series of these which work and do not, and comparing the results should indicate where the problem is.
note to all: on efnet I see tons of bots message me daily. Seeing their messages helps me debug issues within this script, so if you use efnet change it back to "speechles" (this isn't so I can find you google loli porn, animal scat fetish or anything like that, all i really care about is return code and such) and you can help me debug strange things in the future as well. join the channel mentioned next to the @efnet in the script and I can fix the issue 0sec most times..  |
I have the exact same problem. same error message and debug is not sent to me. |
|
| Back to top |
|
 |
pogue Voice

Joined: 17 May 2009 Posts: 28
|
Posted: Thu Jan 14, 2010 1:29 am Post subject: |
|
|
Hi speechless & all,
I found a couple bugs in the script (and I'm using the latest one this time!)
First, the spelling query isn't returning the expected result.
Here is an example on the word "hallucinate" which only tells me the number of search results, but nothing about the word itself. The debug info is the third message.
| Code: | [11:20pm] <~pogue> !g spell:hallucinate
[11:20pm] <+BodyBuildingBot> 89,400 Results
[11:20pm] <BodyBuildingBot> url (200): http://www.google.com/search?q=spell%3Ahallucinate&safe=on&lr=lang_all&num=3&ie=utf-8 charset: utf-8 encode_string: iso8859-1 :: Cookie: SS=Q0=c3BlbGw6aGFsbHVjaW5hdGU; Cookie: PREF=ID=3f3266b67dd1f4c5:TM=1263446402:LM=1263446402:S=KgUBQzysBpczbETv; Cookie: NID=30=J8UU1i28c7fhi-qTQq-BMgR1h2qPrfnC0gJUuA7WlQ7YAsdRuVxOUFUvlKqMF-fQqWnG_iEiMR95J4T1k8mGCeO0o2dE7jMVqGm9km2WpT2Ce3-4TxgMZ0u-ZrZcQ0Id; |
When I intentionally misspelled chocolate, it didn't say Did you mean: chocolate but told me that there are search results for it. I'm guessing there is a break too soon either being returned from Google or in the code.
| Code: | [11:22pm] <~pogue> !g spell:chocolete
[11:22pm] <+BodyBuildingBot> Showing results for spell:chocolate
[11:22pm] <BodyBuildingBot> url (200): http://www.google.com/search?q=spell%3Achocolete&safe=on&lr=lang_all&num=3&ie=utf-8 charset: utf-8 encode_string: iso8859-1 :: Cookie: SS=Q0=c3BlbGw6Y2hvY29sZXRl; Cookie: PREF=ID=8c8cee489601e77a:TM=1263446541:LM=1263446541:S=UB3D9kuNZjOqBe_R; Cookie: NID=30=vcHoGKRVmjfiSQjdXUWPfR3SMHnEXSaRfhpz1QhEV8hucps6Ei5tDJoIzEl7Yzj6PsAyw0kgAQME92cUjnHcUm2seuFbrxK0l1leyn6wrutGLpWyh47c3dchh1xBYMLr; |
Finally, there is a minor error when doing a currency conversion and no debug result was returned.
| Code: | [11:15pm] <~pogue> !g .093985 USD to CAD
[11:15pm] <+BodyBuildingBot> Socket Error accessing 'http://www.google.093985/search?q=USD%20to%20CAD&safe=on&lr=lang_all&num=3&ie=utf-8' .. Does it exist? |
As you can see, it appends the query with a period in it into the google URL and attempts to use that as the domain to search from. If someone does a search with 0.XYZ instead of .XYZ it works fine though.
Just wanted to make you aware of those. Thanks as usual!
pogue
Instead of telling me _________________ Helpful Tools:
|
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Thu Jan 14, 2010 8:18 pm Post subject: |
|
|
| pogue wrote: | Hi speechless & all,
I found a couple bugs in the script (and I'm using the latest one this time!)
First, the spelling query isn't returning the expected result. |
Are you absolutely positive they aren't the expected results?
| pogue wrote: | Here is an example on the word "hallucinate" which only tells me the number of search results, but nothing about the word itself. The debug info is the third message.
| Code: | [11:20pm] <~pogue> !g spell:hallucinate
[11:20pm] <+BodyBuildingBot> 89,400 Results
[11:20pm] <BodyBuildingBot> url (200): http://www.google.com/search?q=spell%3Ahallucinate&safe=on&lr=lang_all&num=3&ie=utf-8 charset: utf-8 encode_string: iso8859-1 :: Cookie: SS=Q0=c3BlbGw6aGFsbHVjaW5hdGU; Cookie: PREF=ID=3f3266b67dd1f4c5:TM=1263446402:LM=1263446402:S=KgUBQzysBpczbETv; Cookie: NID=30=J8UU1i28c7fhi-qTQq-BMgR1h2qPrfnC0gJUuA7WlQ7YAsdRuVxOUFUvlKqMF-fQqWnG_iEiMR95J4T1k8mGCeO0o2dE7jMVqGm9km2WpT2Ce3-4TxgMZ0u-ZrZcQ0Id; |
|
There is a reason your only getting the total number of results. Let me explain why I asked above if your sure that wasn't the right result. In all fairness, it is "correct". To understand the explanation though you must first take into account this is all in an effort to be fully multi-language. Therefore... any "script-generated" messages can never occur (or as infrequently as possible). This means everything must be parsed verbatim from the page to keep in line with this multi-language ability. This becomes a problem, because for web-searching a "correct spelling" would simply be missing the normal "did you mean" field. Now we can't just output "Spelling appears correct." because we want a multi-language feel to it. The only way to really do this, is to simply give the total number of results as our ouput if the spelling is correct and if it isn't to display whatever the "did you mean" message was. This is done entirely from parsing of the webpage. None of those messages are "script generated" in any way, nor could they be, nor should they be. I do have a new version where I've corrected this behavior so the message will always be either results or "did you mean". There won't be those weird times it says "showing results for..." messages any longer.
| pogue wrote: | When I intentionally misspelled chocolate, it didn't say Did you mean: chocolate but told me that there are search results for it. I'm guessing there is a break too soon either being returned from Google or in the code.
| Code: | [11:22pm] <~pogue> !g spell:chocolete
[11:22pm] <+BodyBuildingBot> Showing results for spell:chocolate
[11:22pm] <BodyBuildingBot> url (200): http://www.google.com/search?q=spell%3Achocolete&safe=on&lr=lang_all&num=3&ie=utf-8 charset: utf-8 encode_string: iso8859-1 :: Cookie: SS=Q0=c3BlbGw6Y2hvY29sZXRl; Cookie: PREF=ID=8c8cee489601e77a:TM=1263446541:LM=1263446541:S=UB3D9kuNZjOqBe_R; Cookie: NID=30=vcHoGKRVmjfiSQjdXUWPfR3SMHnEXSaRfhpz1QhEV8hucps6Ei5tDJoIzEl7Yzj6PsAyw0kgAQME92cUjnHcUm2seuFbrxK0l1leyn6wrutGLpWyh47c3dchh1xBYMLr; |
|
This was actually because the "spell:" feature originally coded by incith didn't make full use of google's spelling function. Incith didn't let google know by appending the query with "&spell=1" that the "did you mean" was to be left intact. Without specifying this additional "&spell=1" during the query google may or may not give you a "did you mean". The _next_ version of this script will correctly make full use of google's spell function, supplying "&spell=1" and always returning either results/did-you-mean.
But...Yeah...There is one small problem, which is why I haven't released the new script yet. The "spell" feature presently uses the English phrase "spell:" as the start of your input as the mechanism to detect when to or when not to use the spell function. This makes it hard for users of other languages because it's going against the intentions of this script, and isn't multi-language. So presently I'm figuring a clever way to make this easy for everyone any language they may be using. But for proof here are some quote's from irc.
| Quote: | <speechles> !g .de spell:egg drip
<sp33chy> Meinten Sie: egg drop
<speechles> !g .nl spell:egg drip
<sp33chy> Bedoelde u: egg drop
<speechles> !g .com.au spell:egg drip
<sp33chy> Did you mean: egg drop
<speechles> !g spell:chocolete
<sp33chy> Did you mean: chocolate
<speechles> !g spell:chocolate
<sp33chy> 137,000,000 Results |
| pogue wrote: | Finally, there is a minor error when doing a currency conversion and no debug result was returned.
| Code: | [11:15pm] <~pogue> !g .093985 USD to CAD
[11:15pm] <+BodyBuildingBot> Socket Error accessing 'http://www.google.093985/search?q=USD%20to%20CAD&safe=on&lr=lang_all&num=3&ie=utf-8' .. Does it exist? |
As you can see, it appends the query with a period in it into the google URL and attempts to use that as the domain to search from. If someone does a search with 0.XYZ instead of .XYZ it works fine though. |
This is actually a feature of the script. As google adds new regional servers, the script automatically supports them. The _next_ version will also support google's special searches found here. A small example quoted below.
| pogue wrote: | Just wanted to make you aware of those. Thanks as usual!
pogue |
Indeed, fixing issues is the #1 priority. I just felt I should explain a few things so that your not alarmed when these "bugs" aren't completely fixed, as for the most part these are "features".. heh
Expect the new version either today (with "spell:" left as an English only token for the moment) or tomorrow (with some clever symbol or something used to replace the English "spell:"). _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Fri Jan 15, 2010 9:14 pm Post subject: |
|
|
| cg wrote: | I do wonder if its getting confused up with the iGoogle section of the page, as my workstation defaults to that and I don't recall ever asking it to :\
i'm in NZ, which google.com redirects to google.co.nz.
Cheers,
cg. |
Use the proxy system within the config section to set them apart. | Code: | # set this to the proxy you wish the main html fetching procedure to
# use. set both proxy_host and proxy_port. if you don't wish to use
# a proxy. set proxy_host ""
# --
variable proxy_host ""
variable proxy_port "" |
Once you add a working proxy here, it may also be blocked for some reason from google. So using a variety and checking the differences may be necessary, but this should solve your issue. _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sat Jan 16, 2010 3:16 pm Post subject: |
|
|
| Code: | # .9x: Corrected google "spell" to always return results or #
# did-you-mean. #
# Added "special searches" to google searching. #
# Corrected population/public_data searches to use new #
# template created for these. Is not given as a google
# "answer" anymore. # |
New version here: Incith:Google v1.9.9x ... have a fun
NOTE: This version leaves the english token "spell:" as the mechanism to control the spell feature. Couldn't think of anything clever, so if anyone has an idea feel free to shout it out. ;P _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
transacid Voice
Joined: 08 Aug 2007 Posts: 12 Location: Hamburg / Germany
|
Posted: Sun Jan 17, 2010 9:53 am Post subject: |
|
|
i still get | Code: | | Tcl error [incith::google::public_message]: can't read "state(body)": no such variable | and no addidional debug. |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sun Jan 17, 2010 12:37 pm Post subject: |
|
|
| transacid wrote: | i still get | Code: | | Tcl error [incith::google::public_message]: can't read "state(body)": no such variable | and no addidional debug. |
Hmm... Have you made sure that the "use_gzip" option within the config of the script is set to 0 and you've rehash'd your bot? If this doesn't fix it I've got a better idea to check where the problem lies....
This will require you to use one of my other scripts, namely webby. The reason to do this is because webby has a more robust engine to detect problems. All you need to do is source webby right after you've sourced the google script in your eggdrop.conf and rehash. Then .chanset #yourchan +webby and we can begin testing.
Webby works for me above. So try those two exact webby requests I've done above and paste the replies you get exactly as I've done above in my quote. _________________ speechles' eggdrop tcl archive
Last edited by speechles on Sun Jan 17, 2010 12:42 pm; edited 1 time in total |
|
| Back to top |
|
 |
transacid Voice
Joined: 08 Aug 2007 Posts: 12 Location: Hamburg / Germany
|
Posted: Sun Jan 17, 2010 12:40 pm Post subject: |
|
|
| speechles wrote: | | transacid wrote: | i still get | Code: | | Tcl error [incith::google::public_message]: can't read "state(body)": no such variable | and no addidional debug. |
Hmm... Have you made sure that the "use_gzip" option within the config of the script is set to 0 and you've rehash'd your bot? If this doesn't fix it I've got a better idea to check where the problem lies....
This will require you to use one of my other scripts, namely webby. The reason to do this is because webby has a more robust engine to detect problems. All you need to do is source webby right after you've sourced the google script in your eggdrop.conf and rehash. Then .chanset #yourchan +webby and we can begin testing.
Webby works for me above. So try those two exact webby requests I've done above and paste the replies you get exactly as I've done above in my quote. | oh sorry, well use_gzip did the trick. Why doesn't gzip compression work? |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sun Jan 17, 2010 12:59 pm Post subject: |
|
|
| transacid wrote: | | oh sorry, well use_gzip did the trick. Why doesn't gzip compression work? |
I've tested it myself using zlib and verified this does work with all my scripts supporting gzip. The method for Trf I've merely borrowed from scotteh's RSS Syndication script. For some reason he cuts 9 bytes off as a gzip footer, this is obviously wrong. Both zlib and Trf should remove the same 10 byte header and 8 byte footer before unzipping. This has been corrected (and corrected in Webby as well), clearing your web cache and regetting either the script should solve the problem. It should now work correctly for both zlib or Trf and allow either to successfully deflate gzipped replies.
Enjoy.. and have a fun.. ;P
| Code: | ...snipped from Scotteh's Rss Syndication script...
# remove the 10 byte gzip header and 8 byte footer
set cdata [string range $cdata 10 [expr { [string length $cdata] - 9 } ]]
if {[catch {zip -mode decompress -nowrap 1 $cdata} data] != 0} {
error $data
} |
This is where I borrowed the Trf inflation code. Dunno why he put 8 in the comment and 9 below??! O_o;;??? To strip the eof possibly, but shouldn't this be done after converting from gzip to plaintext? Then you strip the eof off the end of the html seperately if you even care?
Side-Note: If your using the proxy system within the script, (proxy_host/proxy_port) you MUST disable use_gzip by setting it to 0. The header field signifying deflate,gzip is not relayed through most proxies. _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|