last day (484 days later) » 
15:00 - 20:0020:00 - 23:00

Hi @Mnementh :)
 
This is a gallery room... does that make sense or is it better open?
It's probably better open, hang on. Mnementh, you'll be able to talk in a moment
 
Let it be open. I think, it's open source :)
 
room mode changed to Public: anyone may enter and talk
There we are
Righty ho. I know there's another chatbot on the SE network written in Python, which is open source, and we could use as a base to start on
Let me see if I can find it..
 
Sure :)
 
3:29 PM
ohai
 
@Zizouz212 ProgramFOX is said bot's owner
 
hello!
 
If you want a bot example, you can look at one of the example files of ChatExchange, which my bot uses: github.com/Manishearth/ChatExchange/blob/master/examples/…
 
Ta :)
 
That example file is a lot cleaner and easier to read than my bot's code which is... kinda clogged up :P
Feel free to ping me whenever you have a question :)
 
3:32 PM
And down to work we go :)
 
Are you going to host it on a GitHub repo?
Well that's probably a stupid question as it's a bot for Open Source :P
 
@ProgramFOX definitely will do as soon as I've made sense of the code and set it up and started something
@Zizouz212 how's best to organise the development here?
 
Sorry, I'm being viciously attacked by a 5 year old
 
I know the feel. Take your time :)
 
4:14 PM
@ProgramFOX Okay how do I set your bot up on Windows? Given that I can't run the setup.sh file?
 
@ArtOfCode Oh, you have to go manually through the required modules and download them and run the setup file.
let me make a list of the required ones...
 
oh god :)
 
^ Download those, and run python setup.py install (with Python 2!) to install them.
 
oh god i need python 2
 
yup
 
4:25 PM
OK this might take a while. Thanks :)
 
ChatExchange requires Python 2.
also don't forget to run git submodule update --init in the directory of the bot :)
 
Waiting to install Python 2 now
I assume I can run the git commands without it installed yet
 
If you have Git installed that should work.
 
@ProgramFOX Download the dependencies to where?
Same directory?
 
I've a separate folder for them, doesn't have to be in the bot's dir.
 
4:33 PM
Okay... now where's setup.py? XD
 
should be in the downloaded archive
 
Nope... I don't see it in your Github repo either
 
no it certainly isn't in the repo
let me check... which dependency?
 
Oh you mean the dependency's archive
I see now
 
yeah, that's what I meant
 
4:36 PM
Oh dear... now the archives are .tar.gz. I guess I go get winrar too?
 
I believe 7-zip can do those.
always used that to unpack them
 
@ProgramFOX 'no module named setuptools'
dammit
 
ugh
@ArtOfCode Install pypi.python.org/pypi/setuptools first
 
That would indeed help :) You're getting so many credits on this thing...
 
lol
 
4:49 PM
It would appear python 3 is still the one on the path...
 
Ah, yeah, that has to be fixed, or you have to call Python's full path.
 
Bloody hell. Remind me never to delete this so I never have to do it again :)
 
heh :P
 
please don't crash please don't crash
shit
 
:/
what error?
 
5:00 PM
No module named ChatExchange.chatexchange.client
 
Run git submodule update --init
 
Already did
 
Try it again, perhaps something went wrong.
 
Ah, the setup.py for chatexchange hasn't finished yet
 
you won't need that, though
 
5:01 PM
oh
hmm
 
chatexchange doesn't have to be setup.py'd because I give it to my bot from a subdirectory.
 
(you do know that subdir is empty, right?)
 
@ArtOfCode Well, fix that by running the submodule command.
you might have run it without --init
 
Ah is that what it does
 
@ArtOfCode poor you...
I've been watching for the past hour...
 
5:02 PM
@Zizouz212 If you're helping, you've got this to go through as well >:)
 
Sadly, I have python 2 + requests already :D
 
-_-
There are still 2 others.
 
lol
 
You shall suffer as I did!
 
Who are the other two?
 
5:04 PM
@Zizouz212 beautifulsoup4 and websocket-client
 
I need those?
 
Okay :)
 
The links are there
Let's see who can get a working bot faster ;)
 
Me.
xD
 
5:05 PM
Hmm... very true
Pretty sure there's one already running over in the Den
 
yep
 
Right, so the git command is run... I assume I'm meant to run main.py?
 
yep
 
Still the same error
 
Is there anything in the subfolder now?
 
5:07 PM
I pasted the lot in earlier
Which was probably bad
 
So... what is there in your subdirectory now?
 
ChatExchange/chatexchange/*
Except I just deleted that to run the git command again
 
ouch
deleting that wasn't a good idea
 
I'm doing good :D
 
Well... let me update my bot to the latest ChatExchange and then I'll tell you how to solve this quickly.
 
5:10 PM
I can restore it from the bin, probably
 
nah, that's an outdated version anyway
 
Fair
OK I'll just wait for your solution instead because it'll be far easier xD
 
Okay @ArtOfCode, now delete your ChatExchange folder entirely and run these commands:
git pull origin master
git clone github.com/Manishearth/ChatExchange.git
 
Yeah that'd be great if I'd cloned the repository like a normal person
Remind me how to set origin?
 
origin is already set
because you cloned my bot's repo
 
5:14 PM
Ooooh no I didn't
I downloaded the ZIP like a little bitch
 
Is it easier just to delete the thing and clone it?
 
Well, then do this: 1. Delete my bot's directory. 2. Run these commands:
 
K finished with the dependencies
 
git clone github.com/ProgramFOX/SE-Chatbot.git
git submodule update --init
 
5:15 PM
What do I do now?
 
@Zizouz212 see my code block ^
then run main.py
 
k :)
 
god dammit why do I keep closing git
 
Answer "n" to the first question (answering "y" enables special features for a specific room which you won't need), fill in the details and it will post "Bot started." in the target room when it's started.
 
It's asking me for a username...
 
5:16 PM
logon email
won't work if you don't use SE OpenID
Oh, right, I forgot this:
 
So wait, like type in my email?
 
Before you can run the bot, you have to rename SecretSpellsTemplate.py to SecretSpells.py (yes, that's such a thing for that one room) and ConfigTemplate.py to Config.py and edit the most important values in the latter file.
@Zizouz212 yep
 
I'm slightly inclined to punch this thing... no module named SecretSpells
 
@ArtOfCode what I just said a few messages above ^ :)
 
oh that would help
 
5:18 PM
Wait, does it have to be OpenID?
Because I've used my open gmail
 
@Zizouz212 Stack Exchange OpenID email, yes.
 
damn it
 
If your email is a gmail one it's fine, as you as you sign in to SE using SE OpenID.
 
Oh. No owners found. What's the format they should go into Config.py in?
 
I just connected it to Google, will it still be fine?
 
5:19 PM
@Zizouz212 No
 
@Mnementh Get out while you can, you're about to experience hell...
 
If it's connected to SE OpenID too, I believe it should be fine.
 
I'll try it.
 
@ArtOfCode I have put some examples there.
 
You need to be able to login with the StackExchange login button i think
 
5:20 PM
I'll show you what I'm getting:
`Last login: Mon Jun 29 13:10:01 on ttys000
imac:~ zinedine$ git clone https://github.com/ProgramFOX/SE-Chatbox.git
Cloning into 'SE-Chatbox'...
Username for 'https://github.com': `
 
erm
Chatbot, not Chatbox
Ohhhh, a username in the Git terminal, not in my bot's main file!
Fix that typo^ and you should be fine.
 
Oh
lol
wow
 
My bot says "Email" instead of "Username".
but I forgot that
 
Fatal Error! fatal: Not a git repository (or any of the parent directories): .git
 
Uhh...
 
5:23 PM
You need to cd SE-Chatbot
I had that
 
yes, that^
forgot to mention that
 
Oh.
Thanks :) Never done this before
 
I'm only answering here by mind, I'm not actually testing what I'm saying xD
 
@Zizouz212 I've done some... not to this scale
 
I know...
 
5:24 PM
@ProgramFOX You're doing pretty good at remembering how to set it up then
 
Now what? I've submoduled the --init
 
rename those two files as I said before, then put owner data in Config.py (an example is there) and run main.py (see a few messages above)
 
Do python main.py?
 
@Zizouz212 quick question: what do we call this bot?
 
If python is Python 2, yes.
 
5:27 PM
Did I miss something before this? I'm getting an ImportError
 
yes
let me find back that message
9 mins ago, by ProgramFOX
Before you can run the bot, you have to rename SecretSpellsTemplate.py to SecretSpells.py (yes, that's such a thing for that one room) and ConfigTemplate.py to Config.py and edit the most important values in the latter file.
 
Okay thanks :)
 
@Zizouz212 - and @ProgramFOX too - name ideas? I'm going to create a separate account for this bot.
 
edit values? Do I need to edit?
 
@Zizouz212 Yeah. I have put some samples in Config.py but you have to put your user ID in there because you are an owner.
@ArtOfCode Well... \o/ isn't really a word... erm... boring suggestion, PointsBot?
 
5:32 PM
I've called it KarmaBot until we come up with something better :)
 
Sure :D
 
Before you can run the bot from an alternate account, you have to take two steps: 1. make it have 20 rep on any site. 2. Make it manually say something so it has a chat account.
 
I'm guessing this for Configurations.site = stackexchange.com/rooms/25323/chatbot-dev
 
no, stackexchange.com
the room ID will be passed later
 
Just that?
Ok makes sense
Okay, done with the Config...
 
5:38 PM
Guys, can you both upvote this post so that the user gets over 20 rep
 
Oh! AWESOME!
 
done
now wait for caching to be killed
 
well that was quick
 
then make the bot something post in here
 
Back to editing the config
 
5:39 PM
What's Shadow's Den?
 

 Wizards Den

Place for all wizards to share spells, words, and having fun w...
The bot has special features for that room which you wouldn't want anywhere else.
 
@ProgramFOX Optional and NOT RECOMMENDED? I laugh at your recommendations ;)
 
It's asking me for a host..
 
Dammit fox, you forgot the commas at the end of the config lines ;)
 
5:40 PM
Site...
 
@Zizouz212 stackexchange.com
 
oh
wow
i feel stupid now..
 
@ArtOfCode lol oops, will fix
 
Ummmm
TypeError: 'NoneType' object has no attribute '__getitem__'
 
@ArtOfCode Did you run it from the bot account?
 
5:43 PM
I gave it the bot account's login details, yeah
 
9 mins ago, by ProgramFOX
Before you can run the bot from an alternate account, you have to take two steps: 1. make it have 20 rep on any site. 2. Make it manually say something so it has a chat account.
^ That has to happen first, and perhaps you have to wait a bit after each step due to caching.
 
-_- Stop being clever!
 
For now, try to run it from your own account.
 
Yeah caching
 
@KarmaBot Hello There :D
 
5:44 PM
Apparently I don't have 20 rep yet so it can't talk
 
Does that mess you over?
 
Bot started.
 
>>alive
 
@ProgramFOX Yes, I'm alive.
 
\o/
 
5:45 PM
What do I put here? "owners": [ { "stackexchange.com": value? } ],
 
146754
 
This is weird seeing it post as me
Oooh is it my SE-wide ID?
I've given it my ID for here xD
 
@ArtOfCode It's your chat.SE ID.
So, for you, 121520
 
stop
 
errrr
 
5:46 PM
damn
how do i stop it from the console?
>>listcommands
 
@ArtOfCode $-stop
@ArtOfCode it ignores commands from the bot itself...
 
I'm guessing I'll have to create a new account?
 
Oh xD
 
@ArtOfCode Oh... it also makes the bot leave the room, as you noticed :P
 
Yeah...
Also, $-stop stopped the thing by throwing an error ;)
 
5:48 PM
@Zizouz212 If @Art passes you the credentials of KarmaBot then that shouldn't be necessary.
@ArtOfCode Ugh. Which one?
 
@Art ?
 
<< $-stop
error: [Errno 9] Bad file descriptor
2015-06-29 17:47:25.916000 UTC
File "C:\Users\Owen\Documents\Work\Programming\Python\Points\SE-Chatbot-master
\SE-Chatbot\ExceptHook.py", line 38, in run_with_except_hook
run_old(*args, **kw)

File "C:\Python27\lib\threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)

File "C:\Users\Owen\Documents\Work\Programming\Python\Points\SE-Chatbot-master
\SE-Chatbot\ChatExchange\chatexchange\browser.py", line 663, in _runner
a = self.ws.recv()
 
K. Thanks. Let's see what I can do :)
 
@ArtOfCode Oh, something wrong with a websocket connection. Never had that, though, so I don't know if you'll always get that.
 
@ProgramFOX It stopped, which is what I wanted, so I'm not fussed really
KarmaBot caching update: still not ready
 
5:50 PM
@ArtOfCode delete that quickly, Zizouz can view it after you deleted it anyway
so people cannot abuse it
 
Good idea
 
Only room owners and mods can see the content of deleted messages.
 
(removed)? Oh well...
Anyways, I'm getting that same TypeError
 
Hit the dropdown
You can find it in history
 
@Zizouz212 caching, wait a while
 
5:51 PM
Sure
 
When it updates, I'll post a manual message since I've got it logged in
 
Caching like this can take up to an hour, IIRC.
 
-_- SE
Bot started.
 
oh.
Bot started?
 
>>alive
 
5:53 PM
@ProgramFOX Yes, I'm alive.
Ja, the bot's running on my account at the moment
 
ahhhh.
Ok
 
you can listcommands to find the commands
 
Wait, confused
 
??
porque
 
???
 
5:55 PM
why confused?
 
listcommands>
?
 
precede with >>
@ProgramFOX, care to demonstrate?
 
>>listcommands
 
@ProgramFOX Commands: alive, help, listcommands, random, randomchoice, randomint, shuffle, translate, utc, xkcd, xkcdrandomnumber
 
5:56 PM
try xkcd 1329
 
xkcd 1329?
 
It's a command
Run >>xkcd 1329
 
As an argument to python main.py?
 
No, here
 
Where?
 
5:58 PM
In chat
Type that in and hit enter
 
>>xkcd 1329
 
what?
 
Exactly
 
i'm even more confused...
 
5:59 PM
I've got a bot running, posting as me
Anything preceded with >> is a command
 
Let me start from the beginning....
python main.py
 
Co-rrect
 
email + password...
 
When we get KB running, I'll give you +5.8 for that
 
imac:SE-Chatbot zinedine$ python main.py
Does the bot run in Shadow's Den? (y/n) n
Site: stackexchange.com
Room number: 25323
Email address: opensource.se.chatbot@gmail.com
Password:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatfo
err
why?
 
6:03 PM
Sometimes I randomly get that error -- a bot restart resolves it.
 
Restart the shell?
 
just the bot
 
How would I do that?
 
Also, to get rid of the InsecurePlatformWarning, run pip install requests[security] if you use pip.
@Zizouz212 just re-run the command to start it
 
k
That same TypeError... :(
 
6:05 PM
still caching
 
If you're still using the bot's credentials, that's because it can't chat yet. Try using yours.
 
@ProgramFOX You can see?
 
The bot doesn't have 20 rep here, so, yes, I can see that.
 
@ArtOfCode But will mine work? It's just a connected google account?
 
@Zizouz212 Try it :)
 
6:06 PM
Sure :)
 
Hmm... if no SE OpenID is linked to your account, it won't work.
 
Yeah, it doesn't: LoginError: failed to get 'usr' cookie from SE OpenID
 
Ah well. You'll just have to wait until the bot's available
 
Sure :)
 
Anyone know why SE doesn't update the chat rep cache more frequently?
 
6:15 PM
Because it isn't that important.
probably
 
I'll try in a little while
 
You can try it when you see that the chat account has 20 rep.
 
I'll post a message as KarmaBot when the cache updates, so you'll know then
 
Sure :D
Then I'll definitely try it out :D
 
I've seen another bot where it didn't immediately work after they posted a message, though. I hope it works now immediately.
 
6:18 PM
Caching again
 
lol
 
I'm off for a while, but I'll be back later and the bot will probably be ready by then
 
cya
 
Sure. Cya!
 
6:39 PM
I have to go now. If you have a question, ping me and I'll respond tomorrow.
Cya!
 
7:16 PM
@Zizouz212 ja
 
Since we're the room owners here, we can give the karmabot read and write permissions...
Why didn't we think of that!
 
@Zizouz212 I did think of that ;) It didn't let me
 
Oh
never mind :(
 
ArtOfCode has made a change to the feeds posted into this room
ArtOfCode has stopped a feed from being posted into this room
 
room mode changed to Gallery: anyone may enter, but only approved users can talk
room mode changed to Public: anyone may enter and talk
Nope, I can't get it to work
 
7:36 PM
@Zizouz212 mods can grant <20 access, not room owners. I have just discovered this. I've also asked for a mod to come over and do so for us at some point.
 
Oh.
Meh
 
Caching will probably deal with it before that
 
15:00 - 20:0020:00 - 23:00

  last day (484 days later) »