Closed S4nderr closed 3 years ago
Hey @S4nderr,
I'm not able to reproduce the error on my side, however I think I found a solution. Basically the error isn't really about the bot, but rather about the storage and opening of json data locally. In the latest update I applied an enforcement of encoding when loading the json on line 101 in storage_helper.py I recommend deleting your current json file located at .../TinderBot/data/matches/matches.json, so it can start storing the matching locally from start again and updating your project the newest version.
Could you let me know if this solved the issue? Greetings, Fred
After deleting the files and update it work like a charm again ty!
Hate to bring this...
But it stopped again :(
Traceback (most recent call last):
File "C:\Users\Sander\Documents\TinderBot\quickstart.py", line 94, in <module>
geomatch = session.getGeomatch()
File "C:\Users\Sander\Documents\TinderBot\tinderbotz\session.py", line 230, in getGeomatch
name = helper.getName()
File "C:\Users\Sander\Documents\TinderBot\tinderbotz\helpers\geomatch_helper.py", line 126, in getName
return self.getName()
File "C:\Users\Sander\Documents\TinderBot\tinderbotz\helpers\geomatch_helper.py", line 126, in getName
return self.getName()
File "C:\Users\Sander\Documents\TinderBot\tinderbotz\helpers\geomatch_helper.py", line 126, in getName
return self.getName()
[Previous line repeated 965 more times]
File "C:\Users\Sander\Documents\TinderBot\tinderbotz\helpers\geomatch_helper.py", line 125, in getName
self.openProfile()
File "C:\Users\Sander\Documents\TinderBot\tinderbotz\helpers\geomatch_helper.py", line 99, in openProfile
WebDriverWait(self.browser, self.delay).until(EC.presence_of_element_located(
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\support\wait.py", line 71, in until
value = method(self._driver)
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\support\expected_conditions.py", line 64, in __call__
return _find_element(driver, self.locator)
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\support\expected_conditions.py", line 411, in _find_element
return driver.find_element(*by)
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 976, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 319, in execute
response = self.command_executor.execute(driver_command, params)
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 374, in execute
return self._request(command_info[0], url, body=data)
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 397, in _request
resp = self._conn.request(method, url, body=body, headers=headers)
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\request.py", line 79, in request
return self.request_encode_body(
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\request.py", line 171, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\poolmanager.py", line 336, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 426, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\connectionpool.py", line 421, in _make_request
httplib_response = conn.getresponse()
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 1347, in getresponse
response.begin()
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 331, in begin
self.headers = self.msg = parse_headers(self.fp)
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 225, in parse_headers
return email.parser.Parser(_class=_class).parsestr(hstring)
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\email\parser.py", line 67, in parsestr
return self.parse(StringIO(text), headersonly=headersonly)
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\email\parser.py", line 56, in parse
feedparser.feed(data)
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\email\feedparser.py", line 176, in feed
self._call_parse()
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\email\feedparser.py", line 180, in _call_parse
self._parse()
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\email\feedparser.py", line 295, in _parsegen
if self._cur.get_content_maintype() == 'message':
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\email\message.py", line 594, in get_content_maintype
ctype = self.get_content_type()
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\email\message.py", line 578, in get_content_type
value = self.get('content-type', missing)
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\email\message.py", line 471, in get
return self.policy.header_fetch_parse(k, v)
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\email\_policybase.py", line 316, in header_fetch_parse
return self._sanitize_header(name, value)
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\email\_policybase.py", line 287, in _sanitize_header
if _has_surrogates(value):
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\email\utils.py", line 57, in _has_surrogates
s.encode()
RecursionError: maximum recursion depth exceeded while calling a Python object
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "C:\Users\Sander\Documents\TinderBot\tinderbotz\session.py", line 79, in cleanup
print(self.msg_box(lines=lines, title="Tinderbotz"))
File "C:\Users\Sander\AppData\Local\Programs\Python\Python38-32\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-17: character maps to <undefined>
Should be fixed by now. :) There was an infinite recursive function, which caused a crash. It should be working more or less flawless now (hopefully) :D
Still freeezes and is not sending any messages now :(
INPUT:
OUTPUT: