鱼C论坛

 找回密码
 立即注册
查看: 2049|回复: 10

[已解决]猴子补丁问题

[复制链接]
发表于 2020-6-11 18:44:13 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
  1. #gevent使用-猴子补丁问题
  2. import time
  3. import gevent
  4. #解决猴子补丁问题,使用gevent都会有如下操作
  5. from gevent import monkey
  6. monkey.patch_all()       #因为gevent模块有自己的sleep,对time模块的slepp不感知。这一步用猴子来偷换gevent模块的

  7. def a():
  8.     for i in range(4):
  9.         print('A'+str(i))
  10.         time.sleep(0.1)

  11. def b():
  12.     for i in range(4):
  13.         print('B'+str(i))
  14.         time.sleep(0.1)

  15. def c():
  16.     for i in range(4):
  17.         print('C'+str(i))
  18.         time.sleep(0.1)

  19. if __name__ == '__main__':
  20.     ga = gevent.spawn(a)
  21.     gb = gevent.spawn(b)
  22.     gc = gevent.spawn(c)

  23.     ga.join()           #堵塞主进程
  24.     gb.join()
  25.     gc.join()

  26.     print('------------------')
复制代码

我看出错是提前给猴子打补丁,错误提示如下
  1. E:/python_pycharm/进阶学习/xiecheng 3.py:5: MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['_shaded_thriftpy.transport._ssl (D:\\办公\\pycharm\\PyCharm Community Edition 2020.1.1\\plugins\\python-ce\\helpers\\third_party\\thriftpy\\_shaded_thriftpy\\transport\\_ssl.py)'].
  2.   monkey.patch_all()       #因为gevent模块有自己的sleep,对time模块的slepp不感知。这一步用猴子来偷换gevent模块的
  3. A0
  4. B0
  5. C0
  6. A1
  7. B1
  8. C1
  9. A2
  10. B2
  11. C2
  12. A3
  13. B3
  14. C3
  15. ------------------
  16. Traceback (most recent call last):
  17.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_code_executor.py", line 112, in add_exec
  18.     self.finish_exec(more)
  19.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_console_utils.py", line 210, in finish_exec
  20.     return server.notifyFinished(more)
  21.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\pydev\_pydev_comm\pydev_transport.py", line 226, in _req
  22.     return super(TSyncClient, self)._req(_api, *args, **kwargs)
  23.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\thrift.py", line 160, in _req
  24.     return self._recv(_api)
  25.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\thrift.py", line 172, in _recv
  26.     fname, mtype, rseqid = self._iprot.read_message_begin()
  27.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\protocol\binary.py", line 372, in read_message_begin
  28.     self.trans, strict=self.strict_read)
  29.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\protocol\binary.py", line 164, in read_message_begin
  30.     sz = unpack_i32(inbuf.read(4))
  31.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\transport\__init__.py", line 32, in read
  32.     return readall(self._read, sz)
  33.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\transport\__init__.py", line 14, in readall
  34.     chunk = read_fn(sz - have)
  35.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\pydev\_pydev_comm\pydev_transport.py", line 160, in _read
  36.     return self._reader.read_response(sz)
  37.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\pydev\_pydev_comm\pydev_transport.py", line 33, in read_response
  38.     return self._response_pipe.read(sz)
  39.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\pydev\_pydev_comm\pydev_io.py", line 40, in read
  40.     self.bytes_produced.wait()
  41.   File "D:\python3.7\Lib\threading.py", line 296, in wait
  42.     waiter.acquire()
  43.   File "D:\python3.7\lib\site-packages\gevent\thread.py", line 118, in acquire
  44.     acquired = BoundedSemaphore.acquire(self, blocking, timeout)
  45.   File "src\\gevent\\_semaphore.py", line 143, in gevent._gevent_c_semaphore.Semaphore.acquire
  46.   File "src\\gevent\\_semaphore.py", line 178, in gevent._gevent_c_semaphore.Semaphore.acquire
  47.   File "src\\gevent\\_abstract_linkable.py", line 381, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait
  48.   File "src\\gevent\\_abstract_linkable.py", line 346, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait_core
  49.   File "src\\gevent\\_abstract_linkable.py", line 348, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait_core
  50.   File "src\\gevent\\_abstract_linkable.py", line 303, in gevent._gevent_c_abstract_linkable.AbstractLinkable._AbstractLinkable__wait_to_be_notified
  51.   File "src\\gevent\\_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  52.   File "src\\gevent\\_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  53.   File "src\\gevent\\_greenlet_primitives.py", line 65, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  54.   File "src\\gevent\\_gevent_c_greenlet_primitives.pxd", line 35, in gevent._gevent_c_greenlet_primitives._greenlet_switch
  55. gevent.exceptions.LoopExit: This operation would block forever
  56.         Hub: <Hub '' at 0x1eb8b29a328 backend=default ptr=<cdata 'struct uv_loop_s *' 0x00007FFA5BC8BFA0> default pending=0 ref=0 thread_ident=0x5b50>
  57.         Handles:
  58. [HandleState(handle=<cdata 'struct uv_handle_s *' 0x000001EB8A971A68>, type=b'check', watcher=<gevent.libuv.loop.loop at 0x1eb8af7a2b0 backend=default ptr=<cdata 'struct uv_loop_s *' 0x00007FFA5BC8BFA0> default pending=0 ref=0>, ref=0, active=1, closing=0),
  59. HandleState(handle=<cdata 'struct uv_handle_s *' 0x000001EB8A96D458>, type=b'timer', watcher=<gevent.libuv.loop.loop at 0x1eb8af7a2b0 backend=default ptr=<cdata 'struct uv_loop_s *' 0x00007FFA5BC8BFA0> default pending=0 ref=0>, ref=0, active=1, closing=0),
  60. HandleState(handle=<cdata 'struct uv_handle_s *' 0x000001EB8A971B18>, type=b'prepare', watcher=<gevent.libuv.loop.loop at 0x1eb8af7a2b0 backend=default ptr=<cdata 'struct uv_loop_s *' 0x00007FFA5BC8BFA0> default pending=0 ref=0>, ref=0, active=1, closing=0),
  61. HandleState(handle=<cdata 'struct uv_handle_s *' 0x000001EB8A9726C8>, type=b'check', watcher=<gevent.libuv.loop.loop at 0x1eb8af7a2b0 backend=default ptr=<cdata 'struct uv_loop_s *' 0x00007FFA5BC8BFA0> default pending=0 ref=0>, ref=1, active=0, closing=0)]
  62. Traceback (most recent call last):
  63.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\pydev\_pydev_comm\pydev_server.py", line 34, in handle
  64.     self.processor.process(iprot, oprot)
  65.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\thrift.py", line 257, in process
  66.     api, seqid, result, call = self.process_in(iprot)
  67.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\thrift.py", line 212, in process_in
  68.     api, type, seqid = iprot.read_message_begin()
  69.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\protocol\binary.py", line 372, in read_message_begin
  70.     self.trans, strict=self.strict_read)
  71.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\protocol\binary.py", line 164, in read_message_begin
  72.     sz = unpack_i32(inbuf.read(4))
  73.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\transport\__init__.py", line 32, in read
  74.     return readall(self._read, sz)
  75.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\transport\__init__.py", line 14, in readall
  76.     chunk = read_fn(sz - have)
  77.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\transport\buffered\__init__.py", line 39, in _read
  78.     self._rbuf = BytesIO(self._trans.read(max(sz, self._buf_size)))
  79.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\pydev\_pydev_comm\pydev_transport.py", line 215, in read
  80.     return self._read_fn(sz)
  81.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\pydev\_pydev_comm\pydev_transport.py", line 27, in read_request
  82.     return self._request_pipe.read(sz)
  83.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\pydev\_pydev_comm\pydev_io.py", line 40, in read
  84.     self.bytes_produced.wait()
  85.   File "D:\python3.7\Lib\threading.py", line 296, in wait
  86.     waiter.acquire()
  87.   File "D:\python3.7\lib\site-packages\gevent\thread.py", line 118, in acquire
  88.     acquired = BoundedSemaphore.acquire(self, blocking, timeout)
  89.   File "src\\gevent\\_semaphore.py", line 143, in gevent._gevent_c_semaphore.Semaphore.acquire
  90.   File "src\\gevent\\_semaphore.py", line 178, in gevent._gevent_c_semaphore.Semaphore.acquire
  91.   File "src\\gevent\\_abstract_linkable.py", line 381, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait
  92.   File "src\\gevent\\_abstract_linkable.py", line 346, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait_core
  93.   File "src\\gevent\\_abstract_linkable.py", line 348, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait_core
  94.   File "src\\gevent\\_abstract_linkable.py", line 303, in gevent._gevent_c_abstract_linkable.AbstractLinkable._AbstractLinkable__wait_to_be_notified
  95.   File "src\\gevent\\_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  96.   File "src\\gevent\\_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  97.   File "src\\gevent\\_greenlet_primitives.py", line 65, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  98.   File "src\\gevent\\_gevent_c_greenlet_primitives.pxd", line 35, in gevent._gevent_c_greenlet_primitives._greenlet_switch
  99. gevent.exceptions.LoopExit: This operation would block forever
  100.         Hub: <Hub '' at 0x1eb8b29a608 backend=default ptr=<cdata 'struct uv_loop_s *' 0x000001EB8B1CFCE0> pending=0 ref=0 thread_ident=0x4c34>
  101.         Handles:
  102. [HandleState(handle=<cdata 'struct uv_handle_s *' 0x000001EB8A972148>, type=b'check', watcher=<gevent.libuv.loop.loop at 0x1eb8b2aa240 backend=default ptr=<cdata 'struct uv_loop_s *' 0x000001EB8B1CFCE0> pending=0 ref=0>, ref=0, active=1, closing=0),
  103. HandleState(handle=<cdata 'struct uv_handle_s *' 0x000001EB8A96D5F8>, type=b'timer', watcher=<gevent.libuv.loop.loop at 0x1eb8b2aa240 backend=default ptr=<cdata 'struct uv_loop_s *' 0x000001EB8B1CFCE0> pending=0 ref=0>, ref=0, active=1, closing=0),
  104. HandleState(handle=<cdata 'struct uv_handle_s *' 0x000001EB8A972098>, type=b'prepare', watcher=<gevent.libuv.loop.loop at 0x1eb8b2aa240 backend=default ptr=<cdata 'struct uv_loop_s *' 0x000001EB8B1CFCE0> pending=0 ref=0>, ref=0, active=1, closing=0),
  105. HandleState(handle=<cdata 'struct uv_handle_s *' 0x000001EB8A971858>, type=b'check', watcher=<gevent.libuv.loop.loop at 0x1eb8b2aa240 backend=default ptr=<cdata 'struct uv_loop_s *' 0x000001EB8B1CFCE0> pending=0 ref=0>, ref=1, active=0, closing=0)]
复制代码

没看懂  请大佬指教
最佳答案
2020-6-12 09:19:16
莫待无花空折枝 发表于 2020-6-11 22:38
我按CSDN上面把关于genvet模块的都放在上面  没解决
https://blog.csdn.net/a19990412/article/details/ ...

我也不懂了...重装试试吧?
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2020-6-11 18:51:09 | 显示全部楼层

emmm,我没报错?

GIF.gif
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-6-11 19:03:01 | 显示全部楼层
  1. #爬虫协程小例子
  2. import urllib.request
  3. import gevent
  4. from gevent import monkey
  5. monkey.patch_all()

  6. def download(url): #下载网站源代码
  7.     response = urllib.request.urlopen(url)
  8.     html = response.read()
  9.     print('下载了{}数据,长度为{}'.format(url,len(html)))

  10. if __name__ == '__main__':
  11.     urls = ['http://www.163.com','http://www.qq.com','http://www.4399.com']
  12.     #创建协程
  13.     g1 = gevent.spawn(download,urls[0])
  14.     g2 = gevent.spawn(download,urls[1])
  15.     g3 = gevent.spawn(download,urls[2])

  16.     #主进程与协程共死,所以要堵塞
  17.     gevent.joinall(g1,g2,g3)
  18.     print('---------------------')
复制代码


也类似
  1. E:/python_pycharm/进阶学习/xiecheng4.py:5: MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['_shaded_thriftpy.transport._ssl (D:\\办公\\pycharm\\PyCharm Community Edition 2020.1.1\\plugins\\python-ce\\helpers\\third_party\\thriftpy\\_shaded_thriftpy\\transport\\_ssl.py)'].
  2.   monkey.patch_all()
  3. Traceback (most recent call last):
  4.   File "<input>", line 1, in <module>
  5.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile
  6.     pydev_imports.execfile(filename, global_vars, local_vars)  # execute the script
  7.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
  8.     exec(compile(contents+"\n", file, 'exec'), glob, loc)
  9.   File "E:/python_pycharm/进阶学习/xiecheng4.py", line 20, in <module>
  10.     gevent.joinall(g1,g2,g3)
  11.   File "src\\gevent\\greenlet.py", line 1002, in gevent._gevent_cgreenlet.joinall
  12.   File "src\\gevent\\greenlet.py", line 1015, in gevent._gevent_cgreenlet.joinall
  13.   File "src\\gevent\\_hub_primitives.py", line 211, in gevent._gevent_c_hub_primitives.iwait_on_objects
  14.   File "src\\gevent\\_hub_primitives.py", line 247, in gevent._gevent_c_hub_primitives.iwait_on_objects
  15.   File "src\\gevent\\_hub_primitives.py", line 146, in gevent._gevent_c_hub_primitives._WaitIterator.__init__
  16. TypeError: object of type 'gevent._gevent_cgreenlet.Greenlet' has no len()
  17. Traceback (most recent call last):
  18.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\pydev\_pydev_comm\pydev_server.py", line 34, in handle
  19.     self.processor.process(iprot, oprot)
  20.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\thrift.py", line 257, in process
  21.     api, seqid, result, call = self.process_in(iprot)
  22.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\thrift.py", line 212, in process_in
  23.     api, type, seqid = iprot.read_message_begin()
  24.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\protocol\binary.py", line 372, in read_message_begin
  25.     self.trans, strict=self.strict_read)
  26.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\protocol\binary.py", line 164, in read_message_begin
  27.     sz = unpack_i32(inbuf.read(4))
  28.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\transport\__init__.py", line 32, in read
  29.     return readall(self._read, sz)
  30.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\transport\__init__.py", line 14, in readall
  31.     chunk = read_fn(sz - have)
  32.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\third_party\thriftpy\_shaded_thriftpy\transport\buffered\__init__.py", line 39, in _read
  33.     self._rbuf = BytesIO(self._trans.read(max(sz, self._buf_size)))
  34.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\pydev\_pydev_comm\pydev_transport.py", line 215, in read
  35.     return self._read_fn(sz)
  36.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\pydev\_pydev_comm\pydev_transport.py", line 27, in read_request
  37.     return self._request_pipe.read(sz)
  38.   File "D:\办公\pycharm\PyCharm Community Edition 2020.1.1\plugins\python-ce\helpers\pydev\_pydev_comm\pydev_io.py", line 40, in read
  39.     self.bytes_produced.wait()
  40.   File "D:\python3.7\Lib\threading.py", line 296, in wait
  41.     waiter.acquire()
  42.   File "D:\python3.7\lib\site-packages\gevent\thread.py", line 118, in acquire
  43.     acquired = BoundedSemaphore.acquire(self, blocking, timeout)
  44.   File "src\\gevent\\_semaphore.py", line 143, in gevent._gevent_c_semaphore.Semaphore.acquire
  45.   File "src\\gevent\\_semaphore.py", line 178, in gevent._gevent_c_semaphore.Semaphore.acquire
  46.   File "src\\gevent\\_abstract_linkable.py", line 381, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait
  47.   File "src\\gevent\\_abstract_linkable.py", line 346, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait_core
  48.   File "src\\gevent\\_abstract_linkable.py", line 348, in gevent._gevent_c_abstract_linkable.AbstractLinkable._wait_core
  49.   File "src\\gevent\\_abstract_linkable.py", line 303, in gevent._gevent_c_abstract_linkable.AbstractLinkable._AbstractLinkable__wait_to_be_notified
  50.   File "src\\gevent\\_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  51.   File "src\\gevent\\_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  52.   File "src\\gevent\\_greenlet_primitives.py", line 65, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  53.   File "src\\gevent\\_gevent_c_greenlet_primitives.pxd", line 35, in gevent._gevent_c_greenlet_primitives._greenlet_switch
  54. gevent.exceptions.LoopExit: This operation would block forever
  55.         Hub: <Hub '' at 0x199c1fb58e8 backend=default ptr=<cdata 'struct uv_loop_s *' 0x00000199C20113D0> pending=0 ref=0 thread_ident=0x27f0>
  56.         Handles:
  57. [HandleState(handle=<cdata 'struct uv_handle_s *' 0x00000199C0D86E78>, type=b'check', watcher=<gevent.libuv.loop.loop at 0x199c2177748 backend=default ptr=<cdata 'struct uv_loop_s *' 0x00000199C20113D0> pending=0 ref=0>, ref=0, active=1, closing=0),
  58. HandleState(handle=<cdata 'struct uv_handle_s *' 0x00000199BED31578>, type=b'timer', watcher=<gevent.libuv.loop.loop at 0x199c2177748 backend=default ptr=<cdata 'struct uv_loop_s *' 0x00000199C20113D0> pending=0 ref=0>, ref=0, active=1, closing=0),
  59. HandleState(handle=<cdata 'struct uv_handle_s *' 0x00000199C0D86378>, type=b'prepare', watcher=<gevent.libuv.loop.loop at 0x199c2177748 backend=default ptr=<cdata 'struct uv_loop_s *' 0x00000199C20113D0> pending=0 ref=0>, ref=0, active=1, closing=0),
  60. HandleState(handle=<cdata 'struct uv_handle_s *' 0x00000199C0D86428>, type=b'check', watcher=<gevent.libuv.loop.loop at 0x199c2177748 backend=default ptr=<cdata 'struct uv_loop_s *' 0x00000199C20113D0> pending=0 ref=0>, ref=1, active=0, closing=0)]
  61. 下载了http://www.4399.com数据,长度为170375
  62. 下载了http://www.163.com数据,长度为495458
  63. 下载了http://www.qq.com数据,长度为51448
复制代码

我跑到这个网站看 也没看懂
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-6-11 19:04:01 | 显示全部楼层
莫待无花空折枝 发表于 2020-6-11 19:03
也类似

我跑到这个网站看 也没看懂

是因为我的Pycharm少东西嘛?
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-6-11 19:07:25 | 显示全部楼层

评分

参与人数 1鱼币 +3 收起 理由
Twilight6 + 3 我被审核了,你看我发你的消息有正确代码

查看全部评分

小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-6-11 19:15:04 | 显示全部楼层
参数改成列表,正常运行,可能是你电脑环境问题,去重装试试?

https://fishc.com.cn/thread-162968-1-1.html



Snipaste_2020-06-11_19-13-54.png
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-6-11 22:38:22 | 显示全部楼层
Twilight6 发表于 2020-6-11 19:15
参数改成列表,正常运行,可能是你电脑环境问题,去重装试试?

https://fishc.com.cn/thread-162968-1-1 ...

我按CSDN上面把关于genvet模块的都放在上面  没解决
https://blog.csdn.net/a19990412/article/details/82966452
csdn上面几乎都是这个答案

我装了Anaconda也设置了conda环境 ,然后运行还是这样子   这个问题还没解决

大佬还有啥思路不?
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-6-12 09:19:16 | 显示全部楼层    本楼为最佳答案   
莫待无花空折枝 发表于 2020-6-11 22:38
我按CSDN上面把关于genvet模块的都放在上面  没解决
https://blog.csdn.net/a19990412/article/details/ ...

我也不懂了...重装试试吧?
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-6-12 13:10:06 | 显示全部楼层
莫待无花空折枝 发表于 2020-6-11 22:38
我按CSDN上面把关于genvet模块的都放在上面  没解决
https://blog.csdn.net/a19990412/article/details/ ...

解决了?
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-6-12 14:07:21 | 显示全部楼层

没呢      还没想重装pycharm呢  我先跳过把  我的pycharm其他也没遇到过问题
学到后面碰到在解决把
谢谢大佬
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-6-12 14:10:07 | 显示全部楼层
莫待无花空折枝 发表于 2020-6-12 14:07
没呢      还没想重装pycharm呢  我先跳过把  我的pycharm其他也没遇到过问题
学到后面碰到在 ...

客气了  
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-6-21 17:44

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表