Closed jacobbentley closed 6 years ago
Switched to 3.6.x version, same issue:
Traceback (most recent call last):
File "C:\Users\djjak\Downloads\Auto-Amazon-Giveaways-master\give_it_away_now.py", line 18, in
Also hit this error:
Traceback (most recent call last):
File "C:\Users\djjak\Downloads\Auto-Amazon-Giveaways-master\give_it_away_now.py", line 18, in
enable random page selection in give_it_away this fixed the issue for me hope this helps
I'm not seeing a variable for random page selection in give_it_away_now.py
Code here: import asyncio from lib.giveaway import GiveAwayBot
async def main(): ga_bot = GiveAwayBot()
ga_page = await ga_bot.login()
# recursive function to repeat bot tasks for every ga page
async def do_ga_workflow(page):
last_page = await ga_bot.check_for_last_page(page)
while last_page is False:
await ga_bot.process_giveaways(page)
next_page = await ga_bot.iterate_page(page)
await do_ga_workflow(next_page)
# call recursive function to process all bot tasks.
await do_ga_workflow(ga_page)
asyncio.get_event_loop().run_until_complete(main())
Issue was due to actually having the wrong (old) files. Thank you for pointing me in the right direction, @Killerherts
Traceback (most recent call last): File "C:\Users\djjak\Downloads\Auto-Amazon-Giveaways-master\give_it_away_now.py", line 18, in
asyncio.get_event_loop().run_until_complete(main())
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\asyncio\base_events.py", line 568, in run_until_complete
return future.result()
File "C:\Users\djjak\Downloads\Auto-Amazon-Giveaways-master\give_it_away_now.py", line 16, in main
await do_ga_workflow(ga_page)
File "C:\Users\djjak\Downloads\Auto-Amazon-Giveaways-master\give_it_away_now.py", line 13, in do_ga_workflow
next_page = await ga_bot.iterate_page(page)
File "C:\Users\djjak\Downloads\Auto-Amazon-Giveaways-master\lib\giveaway.py", line 151, in iterate_page
next_page
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyppeteer\page.py", line 810, in evaluate
return await frame.evaluate(pageFunction, args, force_expr=force_expr)
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyppeteer\frame_manager.py", line 272, in evaluate
pageFunction, args, force_expr=force_expr)
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyppeteer\execution_context.py", line 44, in evaluate
pageFunction, *args, force_expr=force_expr)
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyppeteer\execution_context.py", line 80, in evaluateHandle
'awaitPromise': True,
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyppeteer\connection.py", line 188, in send
msg = json.dumps(dict(id=_id, method=method, params=params))
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\json__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\json\encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\json\encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\json\encoder.py", line 179, in default
raise TypeError(f'Object of type {o.class.name} '
TypeError: Object of type ElementHandle is not JSON serializable