« first day    last day (483 days later) » 

4:03 PM
@ProgramFOX Is args[0] the command name or the first argument?
 
first arg
 
4:14 PM
Bot started.
 
ooooohhhhh
 
Not enough arguments.
I should do this from the other account... moment
 
user153821
>>points
 
@KarmaBot Not enough arguments.
 
user153821
>>points get
 
user153821
4:15 PM
umm
 
user153821
>>points
 
@KarmaBot Not enough arguments.
 
user153821
...
 
user153821
>>points get
 
user153821
>>points give
 
4:16 PM
@KarmaBot Not enough arguments.
 
user153821
ah okay
 
user153821
>>points give ArtOfCode 100
 
user153821
and it crashed
 
what!
 
Bot started.
 
4:20 PM
@ArtOfCode You can just do in for a dictionary, no need for hasattr.
That is, if user in Points
 
@ProgramFOX I'm bad at Python :)
 
What are you trying to do, I can write it for you
 
user153821
>>points give ArtOfCode 100
 
user153821
crashed
 
What's str_contains?
I don't think that's a function.
again, use the in keyword here
 
4:21 PM
@ProgramFOX I wrote str_contains
 
Can I see the code block? Perhaps I could figure it out
 
Oh... it can be a lot simpler though.
 
Let me push the current one to GH
 
That's slightly outdated right now
I'm pushing
 
4:22 PM
ah
 
Ok :)
 
There we go
 
What's the stack trace?
 
C:\Users\Owen\Documents\Work\Programming\Python\Points\SE-Chatbot-master\SE-Chat
bot>C:/Python27/python.exe main.py
Site: stackexchange.com
Room number: 25323
<< AttributeError: 'dict' object has no attribute 'user'
2015-06-30 16:20:35.880000 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)
 
Ah, that must have been the getattr.
ah, no
Points[user] = 0
 
4:25 PM
No, it's the setting of the new attr
doh
 
Yeah, since it's dict keys and values
 
Bot started.
 
user153821
>>points give ArtOfCode 100
 
user153821
crashed again
 
user153821
somewhere else though
 
4:27 PM
Let's take a look
 
This time line 9, in change_points
the code is already on GH
 
Same thing: points[user]
 
damn, same thing
 
You'll have to change on line 12 as well
 
I'm just find-replacing them all :)
 
4:28 PM
Or that :)
 
OK new push
is up
 
You might have to change a couple things there too, it won't change the setattr
 
Bot started.
 
user153821
>>points give ArtOfCode 100
 
user153821
umm...
 
user153821
4:30 PM
well it didn't crash
 
What did it do?
 
of course it doesn't reply, the return value of give is None
 
Nada on the console
 
None/False -> nothing is fed to chat/console
 
oh for gods sake
 
4:31 PM
Make give_points return "Points given." or something.
 
I meant to return from change_points
 
oh, and make sure it returns a string
 
change_points should always return a string...
 
yeah, I was just saying
in case it returns anything else it will probably crash
 
It still crashes when I run $-stop, BTW
 
4:33 PM
I never got that, but it might be related to the fact that you are in the room here.
Try running it from KarmaBot's account, that has to work now.
 
Bot started.
 
user153821
>>points give ArtOfCode 100
 
@KarmaBot Changed points for ArtOfCode by 100. New total: 100
 
user153821
Woop
 
Hey, give me some!
 
user153821
4:35 PM
Give yourself some xD
 
user153821
I need to fix that too...
 
user153821
>>points give Zizouz212 100
 
@KarmaBot Changed points for Zizouz212 by 100. New total: 100
 
:D
 
user153821
>>points give ProgramFOX 100
 
4:35 PM
@KarmaBot Changed points for ProgramFOX by 100. New total: 100
 
Also remember to store those points in a file as they will get lost at a reboot.
 
pickle?
 
@ArtOfCode yay! :D
 
user153821
@Zizouz212 going to need you to do that
 
I'll write a pickle script right now. Just give me a filepath :)
 
user153821
4:36 PM
because file I/O in python is not something I want to go into
 
@Zizouz212 yep, I always use that too for such things
 
user153821
Currently, use a relative path
 
Pickle is awesome! Just load or dump :)
 
user153821
In fact always use relative because then it'll work on cloud too
 
Sure
 
user153821
4:37 PM
(also because my filepaths are miles long)
 
Should I just get it to input the path?
 
@Zizouz212 What's your GH username? I'll give you write access
 
Lol, I don't have GH...
 
I'd hardcode it myself
 
I'll get an account now though :)
 
4:40 PM
You're going to need it...
You'll also need the Git shell
@ProgramFOX KB's account still don't work
 
...
that's very weird
Perhaps you should try logging out KarmaBot from SE, then run the bot. Dunno if it will help, but it's worth a try.
 
nope
 
huh
Can you post the stack trace of it, that you have now?
 
doesn't want to copy
 
Weird idea: go to stackexchange.com and log in there with your bot's account.
perhaps it's a problem with the network profile or something
 
4:48 PM
it ends with line 212, ChatExchange/chatexchange/browser.py, auth_token = start_login_soup.find('input', {'name': 'authToken'})['value']
 
yeah, that's some authentication issue
Try that^, who knows...
 
user153821
logged in
 
Can you link to your network profile?
 
user153821
Bot started.
 
user153821
You're a genius
 
4:49 PM
oh!
Okay I'll remember this whenever someone else has this problem.
 
>>points give ArtOfCode 100
 
user153821
@ArtOfCode Changed points for ArtOfCode by 100. New total: 100
 
Does $-stop give an error now?
@ArtOfCode the bot ignores edits
 
>>points give ArtOfCode 100000000
 
user153821
@ArtOfCode Changed points for ArtOfCode by 100000000. New total: 100000000
 
4:51 PM
>>points give ArtOfCode -1000
 
user153821
@ArtOfCode You cannot take points from another user.
 
>>points give Zizouz212 100000000000000000000
 
user153821
@Zizouz212 Changed points for Zizouz212 by 100000000000000000000. New total: 100000000000000000000
 
Yaay! :D
 
>>points give ProgramFOX 9999999999999999999999999999999999999999
 
user153821
4:51 PM
@ArtOfCode Changed points for ProgramFOX by 9999999999999999999999999999999999999999. New total: 9999999999999999999999999999999999999999
 
xD
 
>>points give Zizouz212 1
 
user153821
@Zizouz212 Changed points for Zizouz212 by 1. New total: 1
 
lol
 
Okay then
 
4:51 PM
we may have broken it
>>points give ArtOfCode 39
 
user153821
@ArtOfCode Changed points for ArtOfCode by 39. New total: 39
 
So that would be how to take away points :)
 
Thought: does += work in Python?
 
Yep
 
So someone tell me why that's happening...
 
Where's the line?
 
@ProgramFOX It was meant to remove the points from the sender
It's meant to be like a transfer
 
Anyways, I've got the github :)
 
But then the "-" check blocks it
@Zizouz212 username
 
Zizouz212 :)
 
4:55 PM
You have write access
 
Well, then the error here is not too difficult to find out. We give ourselves X points, the change_points method returns that we have X points, but because we gave ourselves points we also took away points from ourselves. Result: zero.
 
Place the "-" check in an if and check to see if the request on the user to modify Points is the same user
 
@ProgramFOX But the point is, the points never get taken away
 
@ProgramFOX does this line not block it?
>>points give Zizouz212 39
 
user153821
4:57 PM
@ArtOfCode Changed points for Zizouz212 by 39. New total: 39
 
no, because that only blocks transfers that go below zero, not at zero
 
>>points give Zizouz212 23
 
user153821
@ArtOfCode Changed points for Zizouz212 by 23. New total: 62
 
Okay, it adds
 
so it doesn't
So that's actually a good defense against giving yourself points...
 
4:58 PM
>>points give Zizouz212 5
 
user153821
@Zizouz212 Changed points for Zizouz212 by 5. New total: 67
 
>>points give Zizouz212 5
 
user153821
@ArtOfCode Changed points for Zizouz212 by 5. New total: 67
 
What?
 
>>points give Zizouz212 –1
 
user153821
4:59 PM
@ProgramFOX Command contains invalid characters.
 
because it gave you them, then took them away again
>>points give Zizouz212 -1
 
user153821
@ArtOfCode You cannot take points from another user.
 
Aha, so my bot disallows circumventing the no-points-revoking-thing by disallowing en and em dashes!
 
>>points give Zizouz212 0
 
user153821
@Zizouz212 Changed points for Zizouz212 by 0. New total: 67
 
4:59 PM
totally forgot it only accepts specific chars, lol
 

« first day    last day (483 days later) »