-->
--> -->
<type 'exceptions.TypeError'> | Python 2.7.18: /usr/bin/python2 Mon Apr 28 15:30:39 2025 |
A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
/home/dividend/public_html/dividend-history.py in <module>() |
1352
|
1353
|
=> 1354 printReCapthca = check.checkVisit("blog_hist.txt", "banned_hist.txt")
|
1355
|
1356 if printReCapthca == True:
|
printReCapthca = False, check = <module 'check' from '/home/dividend/public_html/check.pyc'>, check.checkVisit = <function checkVisit> |
/home/dividend/public_html/check.py in checkVisit(hitsFile='blog_hist.txt', bannedFile='banned_hist.txt') |
12690
|
12691 def checkVisit(hitsFile, bannedFile):
|
=>12692 result = doCheck(hitsFile, bannedFile)
|
12693 if result == True:
|
12694 writeIpToFile("checking.txt")
|
result undefined, global doCheck = <function doCheck>, hitsFile = 'blog_hist.txt', bannedFile = 'banned_hist.txt' |
/home/dividend/public_html/check.py in doCheck(hitsFile='blog_hist.txt', bannedFile='banned_hist.txt') |
12674 def doCheck(hitsFile, bannedFile):
|
12675 if hitsFile != "":
|
=>12676 referrerAndUaCheck(hitsFile, bannedFile)
|
12677 if(ipPermBanned()):
|
12678 return True
|
global referrerAndUaCheck = <function referrerAndUaCheck>, hitsFile = 'blog_hist.txt', bannedFile = 'banned_hist.txt' |
/home/dividend/public_html/check.py in referrerAndUaCheck(hitsFile='blog_hist.txt', bannedFile='banned_hist.txt') |
12625 def referrerAndUaCheck(hitsFile, bannedFile):
|
12626 if "HTTP_REFERER" not in os.environ and not whiteList(cgi.escape(os.environ["HTTP_USER_AGENT"])):
|
=>12627 hits = numberOfOccurences(60, hitsFile, bannedFile)
|
12628 if hits > random.randint(10,13):
|
12629 writeIpToFile(bannedFile)
|
hits undefined, global numberOfOccurences = <function numberOfOccurences>, hitsFile = 'blog_hist.txt', bannedFile = 'banned_hist.txt' |
/home/dividend/public_html/check.py in numberOfOccurences(lastXSeconds=60, hitsFile='blog_hist.txt', bannedFile='banned_hist.txt') |
12606 ips.append(i)
|
12607 if totalIpCount.count(ip) > random.randint(17,23):
|
=>12608 writeIpToFile(bannedFile,ip)
|
12609 return ips.count(ip)
|
12610
|
global writeIpToFile = <function writeIpToFile>, bannedFile = 'banned_hist.txt', global ip = '18.97.9.172' |
<type 'exceptions.TypeError'>: writeIpToFile() takes exactly 1 argument (2 given)
args =
('writeIpToFile() takes exactly 1 argument (2 given)',)
message =
'writeIpToFile() takes exactly 1 argument (2 given)'