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.

Birdy (OAuth, Twitter, Tweets&MegaHAL v6.01d) Jun12,2013

Support & discussion of released scripts, and announcements of new releases.
Post Reply
h
hicks
Voice
Posts: 9
Joined: Wed Dec 19, 2007 3:22 pm

Post by hicks »

I'm getting this in partyline

[13:56] [☻Twitter☻]: unable to convert date-time string "2010-11-17 13:56:00 GMT
ST"
[13:56] Tcl error [proc:twitter:friendsauto]: no such channel record
[13:56] [☻Twitter☻]: unable to convert date-time string "2010-11-17 13:56:00 GMT
ST"
[13:56] Tcl error [proc:twitter:megahal:privatereply]: no such channel record

I have no idea why "GMTST" (I am in GMT timezone). The !twitter [user] trigger does work, but any others seem to give the unable to convert date-time string error in party line, and this is echoed into channel too.

Many thanks in advance if anyone can help :P
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

hicks wrote:I'm getting this in partyline

[13:56] [☻Twitter☻]: unable to convert date-time string "2010-11-17 13:56:00 GMT
ST"
[13:56] Tcl error [proc:twitter:friendsauto]: no such channel record
[13:56] [☻Twitter☻]: unable to convert date-time string "2010-11-17 13:56:00 GMT
ST"
[13:56] Tcl error [proc:twitter:megahal:privatereply]: no such channel record

I have no idea why "GMTST" (I am in GMT timezone). The !twitter [user] trigger does work, but any others seem to give the unable to convert date-time string error in party line, and this is echoed into channel too.

Many thanks in advance if anyone can help :P
<speechles> i can reproduce his error
<speechles> im thinking he did this
<speechles> set timezone "
<speechles> ST"
<Tcldrop2> speechles: #541 Tcl:
<Tcldrop2> speechles: #541 Tcl: ST
<speechles> in his eggdrop conf
<speechles> set oauth_time "%Y-%m-%d %H:%M:%S GMT%Z"
<Tcldrop2> speechles: #544 Tcl: %Y-%m-%d %H:%M:%S GMT%Z
<speechles> then he did that on top of it
<speechles> forcing his timezone with timezone still embedded
<speechles> doubling the timezone, and giving one with the newline
<speechles> set timezone
<Tcldrop2> speechles: #550 Tcl:
<Tcldrop2> speechles: #550 Tcl: ST
<speechles> ;lappend oauth_raw [list oauth_timestamp [clock scan [clock format [clock seconds] -format $::oauth_time] -gmt 1]]
<Tcldrop2> speechles: #555 Tcl error: unable to convert date-time string "2010-11-17 23:55:36 GMTCET": syntax error (characters 19-25)
<speechles> similar error
<speechles> i think i gots what guy did
<speechles> set oauth_time "%Y-%m-%d %H:%M:%S %Z"
<Tcldrop2> speechles: #558 Tcl: %Y-%m-%d %H:%M:%S %Z
<speechles> ;lappend oauth_raw [list oauth_timestamp [clock scan [clock format [clock seconds] -format $::oauth_time] -gmt 1]]
<Tcldrop2> speechles: #559 Tcl: {oauth_timestamp 1290034589}
<speechles> Let me make a post ;D
What I can tell is you did two things very wrong.. lmao

Code: Select all

# This setting defines the timezone is your bot in. It's used for internal
# routines as well as for logfile timestamping and scripting purposes.
# The timezone string specifies the name of the timezone and must be three
# or more alphabetic characters. For example, Central European Time(UTC+1)
# should be "CET"
set timezone "GMT"
Find this setting within your own "eggdrop.conf". Set the bot's timezone here. It MUST be correct. It MUST be the timezone the bot is running in, not your own.

Code: Select all

# Use this to set your timezone on your bot. Most people
# should never need to change this. For FreeBSD you most
# likely will need to alter this.
set oauth_time "%Y-%m-%d %H:%M:%S %Z"
Find this setting in "oAuth.tcl" within twitter.zip. Set the timestring used to evaluate timestamps on your bot here. If you run into problems, change this. Until you do, leave this setting alone.

[13:56] Tcl error [proc:twitter:friendsauto]: no such channel record
[13:56] Tcl error [proc:twitter:megahal:privatereply]: no such channel record

These errors are caused by not using dynamic channels, and instead creating static channels within your eggdrop.conf. Instead, use partyline, and add your channels correctly using ".+chan #chan" at which point those errors will stop.

If you need more help, you need to post your config sections you are using within oauth.tcl and your eggdrop.conf timezone setting.
h
hicks
Voice
Posts: 9
Joined: Wed Dec 19, 2007 3:22 pm

Post by hicks »

Thanks for the reply :)

This is what confused me. I already had this in eggdrop.conf - I should have given more info and mentioned I'd checked this. Might have been relevant I'm using windrop rather than eggdrop too.

Code: Select all

# This setting defines the timezone is your bot in. It's used for internal
# routines as well as for logfile timestamping and scripting purposes.
# The timezone string specifies the name of the timezone and must be three
# or more alphabetic characters. For example, Central European Time(UTC+1)
# should be "CET".
set timezone "GMT"

# The offset setting specifies the time value to be added to the local
# time to get Coordinated Universal Time (UTC aka GMT). The offset is
# positive if the local timezone is west of the Prime Meridian and
# negative if it is east. The value (in hours) must be between -23 and
# 23. For example, if the timezone is UTC+1, the offset is -1.
set offset "0"

# If you don't want to use the timezone setting for scripting purposes only,
# but instead everywhere possible, un-comment the following line.
#set env(TZ) "$timezone $offset"
I changed the line in oauth.tcl to this, and the script now seems to work, without the GMTST strangeness. I should also have mentioned that it looks like GMTST is all one word, but happens to wrap at that point. The bot is also in GMT.

Code: Select all

set oauth_time "%Y-%m-%d %H:%M:%S"
Thanks for the advice, it is very much appreciated. I will also set the channel to dynamic instead to clear partyline errors. :P
F
Football
Master
Posts: 205
Joined: Fri Dec 26, 2008 3:08 pm
Location: Quakenet, #Football

Post by Football »

Who do I get these errors?

Code: Select all

[08:42:43] <EPL> [06:43] Tcl error [proc:twitter:megahal:privatereply]: no such channel record
[08:43:42] <EPL> [06:44] Tcl error [proc:twitter:friendsauto]: no such channel record
[08:43:44] <EPL> [06:44] Tcl error [proc:twitter:megahal:privatereply]: no such channel record
[08:51:44] <Football> [06:52] [Twitter]: can't read "erta": no such variable
Idling at #Football, Quakenet.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Football wrote:Who do I get these errors?

Code: Select all

[08:42:43] <EPL> [06:43] Tcl error [proc:twitter:megahal:privatereply]: no such channel record
[08:43:42] <EPL> [06:44] Tcl error [proc:twitter:friendsauto]: no such channel record
[08:43:44] <EPL> [06:44] Tcl error [proc:twitter:megahal:privatereply]: no such channel record
[08:51:44] <Football> [06:52] [Twitter]: can't read "erta": no such variable
1st through 3rd errors are all the same. You are using your "eggdrop.conf" to define channels and channel settings for some reason. This script will not work that way without modification. I do not intend to make that modification. So you MUST use dynamic channels, and use the bots partyline. Create your channels using .+chan #chan, and .chanset #chan +settings ... This is why you see those errors, I do not script for static config settings. Everything MUST be dynamic.

The 4th error is caused by a "fail whale" that happened on twitter. At these times twitter may, or may not deliver a json response. When twitter doesn't deliver one, that error occured. I've since corrected that issue. So reget the same script (from the same url), and when a "fail whale" occurs, it will now promptly report so instead of cause that error.

Finally, to all those using this script.

Q1) What features do you find lacking and wish were there?
Q2) What annoys you the most about the script?
Q3) Have you twittered with any celebrities yet and actually gotten responses?
Q4) Do you use it everyday, or next to never?
Q5) Care to share your @username/@usernames?

Here is my own answers to my own questions.
A1) auto search function for real time results. Working exactly like "friends" replies do. I WANT THIS NOW! well, soon anyways... heh
A2) the lag ever present when it's polling the API, but this is unavoidable.
A3) yes, and yes ;)
A4) I may not use it everyday personally, but alot of users in my channel use it constantly to tweet about recent events.
A5) sure, @suqmuhnutz and @ndstemp are my 2 accounts tied to 2 irc channels.

Have a fun ;)
S
SignZ
Voice
Posts: 18
Joined: Thu Jun 17, 2010 3:52 pm

Post by SignZ »

Yo, speechles. I might need your help with something.
I'm getting the following messages on partyline (quite often):

Code: Select all

[15:35:56] [FlameHaze] [15:33] [Twitter]: connect failed
[15:35:57] [FlameHaze] [15:33] [Twitter]: connect failed
[15:35:59] [FlameHaze] [15:33] [Twitter]: OAuth failed: ()
[15:35:59] [FlameHaze] [15:33] [Twitter]: OAuth failed: ()
Therefore FlameHaze doesn't post tweets anymore.

Also:

Code: Select all

[15:38:42] [FlameHaze] [15:35] #SignZ# set errorInfo
[15:38:42] [FlameHaze] Currently: OAuth failed: ()
[15:38:42] [FlameHaze] Currently: while executing
[15:38:42] [FlameHaze] Currently: "error $error "
[15:38:42] [FlameHaze] Currently: (procedure "proc:twitter:oauth" line 11)
[15:38:42] [FlameHaze] Currently: invoked from within
[15:38:43] [FlameHaze] Currently: "proc:twitter:oauth $twitter(mention) GET $chan $q"
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

SignZ wrote:Yo, speechles. I might need your help with something.
I'm getting the following messages on partyline (quite often):

Code: Select all

[15:35:56] [FlameHaze] [15:33] [Twitter]: connect failed
[15:35:57] [FlameHaze] [15:33] [Twitter]: connect failed
[15:35:59] [FlameHaze] [15:33] [Twitter]: OAuth failed: ()
[15:35:59] [FlameHaze] [15:33] [Twitter]: OAuth failed: ()
Therefore FlameHaze doesn't post tweets anymore.

Also:

Code: Select all

[15:38:42] [FlameHaze] [15:35] #SignZ# set errorInfo
[15:38:42] [FlameHaze] Currently: OAuth failed: ()
[15:38:42] [FlameHaze] Currently: while executing
[15:38:42] [FlameHaze] Currently: "error $error "
[15:38:42] [FlameHaze] Currently: (procedure "proc:twitter:oauth" line 11)
[15:38:42] [FlameHaze] Currently: invoked from within
[15:38:43] [FlameHaze] Currently: "proc:twitter:oauth $twitter(mention) GET $chan $q"
SignZ: you should read this: http://forum.egghelp.org/viewtopic.php?p=95190#95190 :D

when the box is overflowing and theres not much memory for the bot to run free, it malfunctions like that and it THINKS there are no http headers. you should check your box/server/shell or whatever it is and see if you have multiple proccesses that EAT all the RAM or CPU speed and once you free up some resources, you will get it back to working, it has NOTHING to do with the eggdrop version nor the tcls.
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
a
adi2247
Voice
Posts: 10
Joined: Tue Nov 30, 2010 12:45 am

Post by adi2247 »

speechles wrote:
Trixar_za wrote:By the looks of it, I'm using http package 2.5.2 - so there must have been one hell of a change between 2.5.2 and 2.5.3 to present this issue hey?

Code: Select all

	# These are handled specially
	array set map { " " + \n %0d%0a }
	variable formMap [array get map]
Find the above in your copy of http.tcl
it's located in either: /lib/tcl8.4/ --or-- /lib/tcl8.4/http2.5
Change it to look like it is below:

Code: Select all

	# These are handled specially
	set map(\n) %0d%0a
	variable formMap [array get map]
This is the BIG change that occured that basically broke it. Changing this will fix it all and you will be solved. ;)
im having similar errors as the person you helped with this. I too had an outdated http.tcl file.
I uninstalled all of my tcl, recompiled/installed the latest version, confirmed the new http.tcl is installed in /usr/local/lib/tcl8.5/http1.0/

i recompiled eggdrop from scratch and also put http.tcl in the scripts directory. http.tcl is also loaded from egdrop.conf on start up ahead of all other scripts to be loaded.

I have the twitter related scripts listed in the order you mentioned in the previous thread.

!user works, !friends works

!follow fails with the following error:
[Twitter]: OAuth failed: (401) Error: incorrect signature; Request: \/1\/friendships\/create.json

!tweet test fails w the following error:
[Twitter]: OAuth failed: (401) Error: incorrect signature; Request: \/1\/statuses\/update.json

to confirm my http.tcl file looks like yours:

Code: Select all

	# These are handled specially
	set map(\n) %0d%0a
	variable formMap [array get map]
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

adi2247 wrote:
speechles wrote:
Trixar_za wrote:By the looks of it, I'm using http package 2.5.2 - so there must have been one hell of a change between 2.5.2 and 2.5.3 to present this issue hey?

Code: Select all

	# These are handled specially
	array set map { " " + \n %0d%0a }
	variable formMap [array get map]
Find the above in your copy of http.tcl
it's located in either: /lib/tcl8.4/ --or-- /lib/tcl8.4/http2.5
Change it to look like it is below:

Code: Select all

	# These are handled specially
	set map(\n) %0d%0a
	variable formMap [array get map]
This is the BIG change that occured that basically broke it. Changing this will fix it all and you will be solved. ;)
im having similar errors as the person you helped with this. I too had an outdated http.tcl file.
I uninstalled all of my tcl, recompiled/installed the latest version, confirmed the new http.tcl is installed in /usr/local/lib/tcl8.5/http1.0/

i recompiled eggdrop from scratch and also put http.tcl in the scripts directory. http.tcl is also loaded from egdrop.conf on start up ahead of all other scripts to be loaded.

I have the twitter related scripts listed in the order you mentioned in the previous thread.

!user works, !friends works

!follow fails with the following error:
[Twitter]: OAuth failed: (401) Error: incorrect signature; Request: \/1\/friendships\/create.json

!tweet test fails w the following error:
[Twitter]: OAuth failed: (401) Error: incorrect signature; Request: \/1\/statuses\/update.json

to confirm my http.tcl file looks like yours:

Code: Select all

	# These are handled specially
	set map(\n) %0d%0a
	variable formMap [array get map]
Why are you placing it in the http1.0 folder? The script will look for "http2.5" first, if that isn't available, will default to any http package. So you are not changing the correct folders contents.

To help debug this, use the config section of oauth.tcl...

Code: Select all

# Incorrect signature, other errors pissing you off.
# Get the inside look at every oauth transaction via query
# set your debug nick here
set oauthdebug ""
Put your nickname inside those "". Then .rehash your bot. Now try +follow or !tweet and paste back the base_string, and other oAuth headers your bot will PM you when you've done this. Remember once you solve the problem, to set this back to "" and .rehash. Sending all those debug messages slows down your bot.
a
adi2247
Voice
Posts: 10
Joined: Tue Nov 30, 2010 12:45 am

Post by adi2247 »

thanks for the heads up on the http1.0 folder, not sure why http2.5 wasn't created when in reinstalled tcl. I manualy created the http2.5 dir and put the new http.tcl file in there, chmod 755 http2.5 and chmod 644 http.tcl. it now resides in:
/usr/local/lib/tcl8.5/http2.5/http.tcl

.rehashed and heres the output from +follow twitter:
a
adi2247
Voice
Posts: 10
Joined: Tue Nov 30, 2010 12:45 am

Post by adi2247 »

Just an update, i got this worked out and now authenticates. A few points to mention:

http2.5 folder is aparently only created w TCL 8.4.X NOT 8.5.X versions. more info on that:
http://wiki.tcl.tk/1475
The version of http distributed in the Tcl 8.4.18 core distribution is 2.5.3.

The Tcl 8.5.2 release provides the http version 2.7 with partial HTTP 1.1 support.

The TclSOAP project also contains a distribution of a proposed version 2.5 [1] (with some http 1.1 support), and tclvfs extends that to a proposed version 2.6 (with some webdav support) (merged into the tclsoap projects version (23jun03)). However, versions 2.5/2.6 seem to have introduced at least one bug (reported against tclsoap on sourceforge).

Tcl 8.6 will include full HTTP/1.1 support in its http package.
so i wound up uninstalling 8.5.x and downgraded to 8.4.x inorder to get the proper directory structure/libraries associates with http 2.5.3 etc. this may or may not apply for people struggling to get http to use the correct version etc.

**I do not believe this why i couldnt auth, but after learnign of the directory structure, made sense to start anew here.

I then reapplied for NEW twitter api keys. ** the new keys solved the problem!
a
adi2247
Voice
Posts: 10
Joined: Tue Nov 30, 2010 12:45 am

Post by adi2247 »

bit of an error recently but doesn't seem to effect posting to twitter, just posting the confirm to chat:

[14:35:01] Tcl error [proc:tweet]: can't read "id": no such variable

this is intermitent and even when the error does occur, posts are still being made to twitter, but the confirmation of the post is not sent to the chatroom.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

adi2247 wrote:bit of an error recently but doesn't seem to effect posting to twitter, just posting the confirm to chat:

[14:35:01] Tcl error [proc:tweet]: can't read "id": no such variable

this is intermitent and even when the error does occur, posts are still being made to twitter, but the confirmation of the post is not sent to the chatroom.
This was caused by twitter's move to Snowflake "string" ID's rather than purely "integer based" ID's. Re-getting the script will solve this, it now uses Snowflake ID's for all message-ID's. Also corrected a few bugs here and there, and finalized the display. Comments and criticism, both welcome.

http://ereader.kiczek.com/twitter.zip

Enjoy, and have a fun. :)
a
adi2247
Voice
Posts: 10
Joined: Tue Nov 30, 2010 12:45 am

Post by adi2247 »

works perfect, ty for the update!
m
mat
Voice
Posts: 2
Joined: Mon Dec 27, 2010 9:14 am

Post by mat »

hey,

is it possible with that script - to repost messages from a hashtag?


so i use the rss reader for a twitter hashtag (atom.feed) to post the messages into a channel - but - i would like to fix the output for it like

[$user] $text - $url


at the moment its only

$text - $url and thats stupid :D


greetings
mat
Post Reply