yqchilde / JDMemberCloseAccount

学习python操作selenium的一个🌰 ,也是一种京东全自动退会方案
MIT License
1.24k stars 346 forks source link

报错提示:libiomp5md.dll already initialized 和 KeyError: 'specify_shops' #120

Closed ArsenicX closed 2 years ago

ArsenicX commented 2 years ago

大概在上半年的时候用过一次,今天再用的时候,发现卡到了退会的页面,但是不会自动点击 【发送验证码】。以为是软件版本没更新的问题,于是更新了新版本,结果报错:

OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.

我搜了几个文章,然后在 main.py 开头添加了这段代码之后,就不报 already initialized 这个错了

import os
os.environ['KMP_DUPLICATE_LIB_OK'] = 'TRUE'

但是又报了下面这个错。

[2021-11-25 13:09:51] [INFO] 欢迎执行JD全自动退会程序,如有使用问题请加TG群https://t.me/jdMemberCloseAccount进行讨论
Traceback (most recent call last):
  File "C:/Users/swong/Desktop/JDMemberCloseAccount-main/main.py", line 659, in <module>
    JDMemberCloseAccount().main()
  File "C:/Users/swong/Desktop/JDMemberCloseAccount-main/main.py", line 536, in main
    if len(self.shop_cfg["specify_shops"]) > 0:
KeyError: 'specify_shops'

请问下大佬,怎么解决呀? 已经试过了删除整个 JDMemberCloseAccount-main 文件夹,从头开始重新配置,但还是报同样的错

ArsenicX commented 2 years ago

specify_shops 的问题已解决,是因为用了旧版 config 但是第一个错不知道为什么,只能通过 os.environ['KMP_DUPLICATE_LIB_OK'] = 'TRUE' 临时解决了