On most of the questions I get a lot of error code popping up before method 1 statrt. It still provides an answer, but makes everything messy and harder to find. Also, on a side note, why isn't method 2 running? (i haven't changed any of the code)
Here is an example:
Question detected.
Question 1 out of 12
According to the old song “Row, Row, Row Your Boat,” life is but a what?
['Dream', 'Massive phoenix tattoo', 'Bitcoin scam']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\logging__init.py", line 992, in emit
msg = self.format(record)
File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\logging\init.py", line 838, in format
return fmt.format(record)
File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\logging\init.py", line 575, in format
record.message = record.getMessage()
File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\logging\init__.py", line 338, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "C:\Users\Topher\Documents\HackQ-Trivia\hq_main.py", line 47, in
asyncio.get_event_loop().run_until_complete(networking.websocket_handler(socket, headers))
File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\asyncio\base_events.py", line 454, in run_until_complete
self.run_forever()
File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\asyncio\base_events.py", line 421, in run_forever
self._run_once()
File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\asyncio\base_events.py", line 1431, in _run_once
handle._run()
File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\asyncio\events.py", line 145, in _run
self._callback(*self._args)
File "C:\Users\Topher\Documents\HackQ-Trivia\networking.py", line 17, in fetch
logging.error(type(e), e)
Message: <class 'concurrent.futures._base.TimeoutError'>
Arguments: (TimeoutError(),)
Running method 1
{'dream': 32, 'massive phoenix tattoo': 0, 'bitcoin scam': 0}
dream
On most of the questions I get a lot of error code popping up before method 1 statrt. It still provides an answer, but makes everything messy and harder to find. Also, on a side note, why isn't method 2 running? (i haven't changed any of the code)
Here is an example:
Question detected. Question 1 out of 12 According to the old song “Row, Row, Row Your Boat,” life is but a what? ['Dream', 'Massive phoenix tattoo', 'Bitcoin scam']
Searching ['Dream', 'Massive phoenix tattoo', 'Bitcoin scam'] ['according', 'old', 'song', 'row, row, row your boat,', 'life'] ['https://en.wikipedia.org/wiki/Row,_Row,_Row_Your_Boat', 'https://www.youtube.com/watch?v=EDrVCqeZIAY', 'http://sausedo.net/2012/10/25/the-truth-about-row-row-row-your-boat/', 'http://thedailyranter.com/articles/things-people-dont-realize/2013/11/10/row-row-row-your-boat-is-a-totally-twisted-fucked-up-song', 'https://mudcat.org/thread.cfm?threadid=21766'] Server timeout/error to http://sausedo.net/2012/10/25/the-truth-about-row-row-row-your-boat/ --- Logging error --- Traceback (most recent call last): File "C:\Users\Topher\Documents\HackQ-Trivia\networking.py", line 13, in fetch async with session.get(url, timeout=timeout) as response: File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\site-packages\aiohttp\client.py", line 783, in aenter self._resp = await self._coro File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\site-packages\aiohttp\client.py", line 333, in _request await resp.start(conn, read_until_eof) File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\site-packages\aiohttp\client_reqrep.py", line 708, in start self._continue = None File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\site-packages\aiohttp\helpers.py", line 670, in exit raise asyncio.TimeoutError from None concurrent.futures._base.TimeoutError
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\logging__init.py", line 992, in emit msg = self.format(record) File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\logging\init.py", line 838, in format return fmt.format(record) File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\logging\init.py", line 575, in format record.message = record.getMessage() File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\logging\init__.py", line 338, in getMessage msg = msg % self.args TypeError: not all arguments converted during string formatting Call stack: File "C:\Users\Topher\Documents\HackQ-Trivia\hq_main.py", line 47, in
asyncio.get_event_loop().run_until_complete(networking.websocket_handler(socket, headers))
File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\asyncio\base_events.py", line 454, in run_until_complete
self.run_forever()
File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\asyncio\base_events.py", line 421, in run_forever
self._run_once()
File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\asyncio\base_events.py", line 1431, in _run_once
handle._run()
File "C:\Users\Topher\AppData\Local\Programs\Python\Python36-32\lib\asyncio\events.py", line 145, in _run
self._callback(*self._args)
File "C:\Users\Topher\Documents\HackQ-Trivia\networking.py", line 17, in fetch
logging.error(type(e), e)
Message: <class 'concurrent.futures._base.TimeoutError'>
Arguments: (TimeoutError(),)
Running method 1
{'dream': 32, 'massive phoenix tattoo': 0, 'bitcoin scam': 0}
dream
Question nouns: ['row, row, row your boat,'] Running method 3 Search processed URLs fetched
Dream: {'row, row, row your boat,': 0} Massive phoenix tattoo: {'row, row, row your boat,': 0} Bitcoin scam: {'row, row, row your boat,': 0}
Keyword scores: {'Dream': 36, 'Massive phoenix tattoo': 9, 'Bitcoin scam': 9} Noun scores: {'Dream': 0, 'Massive phoenix tattoo': 0, 'Bitcoin scam': 0} Dream