Drinkhuahuaniu / INShuaKe

干部网络学院刷课
19 stars 3 forks source link

请问这个该怎么解决,纯小白 #9

Open 3206662637 opened 2 months ago

3206662637 commented 2 months ago

image 请问这样的该怎么解决

Drinkhuahuaniu commented 2 months ago

image 请问这样的该怎么解决

y是yes,n是no,输入y敲个回车代表同意

3206662637 commented 2 months ago

好的,谢谢。环境配置部分已经完成了,我放到pycharm运行的时候报错如下: C:\Users\32066\Downloads\INShuaKe-main.venv\Scripts\python.exe C:\Users\32066\Downloads\INShuaKe-main\main.py Traceback (most recent call last): File "C:\Users\32066\Downloads\INShuaKe-main\main.py", line 10, in asyncio.run(main()) File "E:\python\Lib\asyncio\runners.py", line 194, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "E:\python\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\python\Lib\asyncio\base_events.py", line 687, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\32066\Downloads\INShuaKe-main\main.py", line 7, in main await shuake.start() # 运行 shuake.start() 方法 ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\32066\Downloads\INShuaKe-main\Shuake.py", line 19, in start self.context = await self.browser.new_context() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\32066\Downloads\INShuaKe-main.venv\Lib\site-packages\playwright\async_api_generated.py", line 13328, in new_context await self._impl_obj.new_context( File "C:\Users\32066\Downloads\INShuaKe-main.venv\Lib\site-packages\playwright_impl_browser.py", line 127, in new_context channel = await self._channel.send("newContext", params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\32066\Downloads\INShuaKe-main.venv\Lib\site-packages\playwright_impl_connection.py", line 59, in send return await self._connection.wrap_api_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\32066\Downloads\INShuaKe-main.venv\Lib\site-packages\playwright_impl_connection.py", line 509, in wrap_api_call return await cb() ^^^^^^^^^^ File "C:\Users\32066\Downloads\INShuaKe-main.venv\Lib\site-packages\playwright_impl_connection.py", line 97, in inner_send result = next(iter(done)).result() ^^^^^^^^^^^^^^^^^^^^^^^^^ playwright._impl._errors.TargetClosedError: Target page, context or browser has been closed

进程已结束,退出代码为 1

Drinkhuahuaniu commented 2 months ago

好的,谢谢。环境配置部分已经完成了,我放到pycharm运行的时候报错如下: C:\Users\32066\Downloads\INShuaKe-main.venv\Scripts\python.exe C:\Users\32066\Downloads\INShuaKe-main\main.py Traceback (most recent call last): File "C:\Users\32066\Downloads\INShuaKe-main\main.py", line 10, in asyncio.run(main()) File "E:\python\Lib\asyncio\runners.py", line 194, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "E:\python\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\python\Lib\asyncio\base_events.py", line 687, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\32066\Downloads\INShuaKe-main\main.py", line 7, in main await shuake.start() # 运行 shuake.start() 方法 ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\32066\Downloads\INShuaKe-main\Shuake.py", line 19, in start self.context = await self.browser.new_context() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\32066\Downloads\INShuaKe-main.venv\Lib\site-packages\playwright\async_api_generated.py", line 13328, in new_context await self._impl_obj.new_context( File "C:\Users\32066\Downloads\INShuaKe-main.venv\Lib\site-packages\playwright_impl_browser.py", line 127, in new_context channel = await self._channel.send("newContext", params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\32066\Downloads\INShuaKe-main.venv\Lib\site-packages\playwright_impl_connection.py", line 59, in send return await self._connection.wrap_api_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\32066\Downloads\INShuaKe-main.venv\Lib\site-packages\playwright_impl_connection.py", line 509, in wrap_api_call return await cb() ^^^^^^^^^^ File "C:\Users\32066\Downloads\INShuaKe-main.venv\Lib\site-packages\playwright_impl_connection.py", line 97, in inner_send result = next(iter(done)).result() ^^^^^^^^^^^^^^^^^^^^^^^^^ playwright._impl._errors.TargetClosedError: Target page, context or browser has been closed

进程已结束,退出代码为 1

你config.py里的文件配置了吗?