Ich habe den folgenden Code, die aus Text zwei Strings extrahiert von verschiedenen MusternRuntime: maximale Rekursionstiefe überschritten
def urlChange(self, event):
text = self.txtUrl.GetValue()
matches = re.findall('GET (\S+).*Host: (\S+).*Cookie: (.+\S)\s*', text, re.DOTALL or re.MULTILINE)
if matches:
groups = matches[0]
self.txtUrl.SetValue(groups[1] + groups[0])
self.txtCookie.SetValue(groups[2])
else:
matches = re.findall('GET (\S+).*Host: (\S+).*', text, re.DOTALL or re.MULTILINE)
if matches:
groups = matches[0]
self.txtUrl.SetValue(groups[1] + groups[0])
self.txtCookie.Clear()
else:
matches = re.findall('.*(http://\S+)', text, re.DOTALL or re.MULTILINE)
if matches:
self.txtUrl.SetValue(matches[0])
matches = re.findall('.*Cookie: (.+\S)', text, re.DOTALL or re.MULTILINE)
if matches:
self.txtCookie.SetValue(matches[0])
nur passend, wenn die letzten re.findall('.*(http://\S+)'...
Anweisung ausgeführt bekomme ich folgende Fehlermeldung:
Traceback (most recent call last):
File "./curl-gui.py", line 105, in urlChange
text = self.txtUrl.GetValue()
RuntimeError: maximum recursion depth exceeded
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/apport_python_hook.py", line 48, in apport_excepthook
if not enabled():
File "/usr/lib/python2.6/dist-packages/apport_python_hook.py", line 21, in enabled
import re
RuntimeError: maximum recursion depth exceeded while calling a Python object
Original exception was:
Traceback (most recent call last):
File "./curl-gui.py", line 105, in urlChange
text = self.txtUrl.GetValue()
RuntimeError: maximum recursion depth exceeded
weiß ich nichts, aber es sieht aus wie das Problem der Zeile 'self.txtUrl.GetValue()' ist. Was macht 'GetValue'? – Kobi