-->
--> -->
<type 'exceptions.TypeError'> | Python 2.7.18: /usr/bin/python2 Sun Apr 20 07:16:31 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/ex-dividend-date-search.py in <module>() |
1226
|
1227
|
=> 1228 printReCapthca = check.checkVisit("blog.txt", "banned.txt")
|
1229
|
1230 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.txt', bannedFile='banned.txt') |
12686
|
12687 def checkVisit(hitsFile, bannedFile):
|
=>12688 result = doCheck(hitsFile, bannedFile)
|
12689 if result == True:
|
12690 writeIpToFile("checking.txt")
|
result undefined, global doCheck = <function doCheck>, hitsFile = 'blog.txt', bannedFile = 'banned.txt' |
/home/dividend/public_html/check.py in doCheck(hitsFile='blog.txt', bannedFile='banned.txt') |
12670 def doCheck(hitsFile, bannedFile):
|
12671 if hitsFile != "":
|
=>12672 referrerAndUaCheck(hitsFile, bannedFile)
|
12673 if(ipPermBanned()):
|
12674 return True
|
global referrerAndUaCheck = <function referrerAndUaCheck>, hitsFile = 'blog.txt', bannedFile = 'banned.txt' |
/home/dividend/public_html/check.py in referrerAndUaCheck(hitsFile='blog.txt', bannedFile='banned.txt') |
12621 def referrerAndUaCheck(hitsFile, bannedFile):
|
12622 if "HTTP_REFERER" not in os.environ and not whiteList(cgi.escape(os.environ["HTTP_USER_AGENT"])):
|
=>12623 hits = numberOfOccurences(60, hitsFile, bannedFile)
|
12624 if hits > random.randint(10,13):
|
12625 writeIpToFile(bannedFile)
|
hits undefined, global numberOfOccurences = <function numberOfOccurences>, hitsFile = 'blog.txt', bannedFile = 'banned.txt' |
/home/dividend/public_html/check.py in numberOfOccurences(lastXSeconds=60, hitsFile='blog.txt', bannedFile='banned.txt') |
12602 ips.append(i)
|
12603 if totalIpCount.count(ip) > random.randint(17,23):
|
=>12604 writeIpToFile(bannedFile,ip)
|
12605 return ips.count(ip)
|
12606
|
global writeIpToFile = <function writeIpToFile>, bannedFile = 'banned.txt', global ip = '18.97.14.80' |
<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)'