-->
--> -->
<type 'exceptions.TypeError'> | Python 2.7.18: /usr/bin/python2 Thu Mar 27 23:51:58 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>() |
1345
|
1346
|
=> 1347 printReCapthca = check.checkVisit("blog_hist.txt", "banned_hist.txt")
|
1348
|
1349 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') |
12681
|
12682 def checkVisit(hitsFile, bannedFile):
|
=>12683 result = doCheck(hitsFile, bannedFile)
|
12684 if result == True:
|
12685 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') |
12665 def doCheck(hitsFile, bannedFile):
|
12666 if hitsFile != "":
|
=>12667 referrerAndUaCheck(hitsFile, bannedFile)
|
12668 if(ipPermBanned()):
|
12669 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') |
12616 def referrerAndUaCheck(hitsFile, bannedFile):
|
12617 if "HTTP_REFERER" not in os.environ and not whiteList(cgi.escape(os.environ["HTTP_USER_AGENT"])):
|
=>12618 hits = numberOfOccurences(60, hitsFile, bannedFile)
|
12619 if hits > random.randint(10,13):
|
12620 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') |
12597 ips.append(i)
|
12598 if totalIpCount.count(ip) > random.randint(17,23):
|
=>12599 writeIpToFile(bannedFile,ip)
|
12600 return ips.count(ip)
|
12601
|
global writeIpToFile = <function writeIpToFile>, bannedFile = 'banned_hist.txt', global ip = '18.97.14.91' |
<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)'