报错内容:

Failed to import test module: app.BusinessProcess.testLendRequestProcess.testPrivateOwner.test_001_lend_request_private_owner_module
Traceback (most recent call last):
File "C:\Python36\lib\unittest\loader.py", line 428, in _find_test_path
module = self._get_module_from_name(name)
File "C:\Python36\lib\unittest\loader.py", line 369, in _get_module_from_name
__import__(name)
File "C:\chushujin\study\sales_ui_auto\testCase\app\BusinessProcess\testLendRequestProcess\testPrivateOwner\test_001_lend_request_private_owner_module.py", line 9, in <module>
from page.app.BusinessProcess.testLendRequestProcess.testPrivateOwner.page_sales_lend_request_private_owner_module import PageSalesLendRequestPrivateOwner
File "C:\chushujin\study\sales_ui_auto\page\app\BusinessProcess\testLendRequestProcess\testPrivateOwner\page_sales_lend_request_private_owner_module.py", line 8, in <module>
from locator.app.BusinessProcess.testLendRequestProcess.testPrivateOwner.locator_sales_lend_request_private_owner_module import LocatorSalesLendRequestPrivateOwner
File "C:\chushujin\study\sales_ui_auto\locator\app\BusinessProcess\testLendRequestProcess\testPrivateOwner\locator_sales_lend_request_private_owner_module.py", line 9, in <module>
class LocatorSalesLendRequestPrivateOwner:
File "C:\chushujin\study\sales_ui_auto\locator\app\BusinessProcess\testLendRequestProcess\testPrivateOwner\locator_sales_lend_request_private_owner_module.py", line 18, in LocatorSalesLendRequestPrivateOwner
lend_request_private_owner_proportion_of_shares_xpath = myConfig.getAppElement("lend_request_private_owner_proportion_of_shares_xpath")
File "C:\chushujin\study\sales_ui_auto\comm\my_config.py", line 62, in getAppElement
app_Element = config.get('appElement',key)
File "C:\Python36\lib\configparser.py", line 800, in get
d)
File "C:\Python36\lib\configparser.py", line 394, in before_get
self._interpolate_some(parser, option, L, value, section, defaults, 1)
File "C:\Python36\lib\configparser.py", line 444, in _interpolate_some
"found: %r" % (rest,))
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: "%)']/following::android.widget.EditText"

总的分析来说 ,最后一句才是重点:读取配置文件config.ini时候,里面存在%引起的

解决方法一:

configparser很可能正在读取字符串中的文字“%”符号。'%'符号用于字符串插值(替代)。如果要使用文字“%”,可以使用另一个“%”对其进行转义。例如,在configparser读取的配置变量中,使用“ 100 %%”表示“ 100%”。

解决方法二:

cf= configparser.ConfigParser()

改为:

cf = configparser.RawConfigParser()

十四、报错:configparser.InterpolationSyntaxError: ‘%‘ must be followed by ‘%‘ or ‘(‘, found: “%)‘] 的解决相关推荐

  1. stacktrace not available;stata报错:stacktrace not available是什么意思,如何解决?

    stacktrace not available:stata报错:stacktrace not available是什么意思,如何解决? "stacktrace not available& ...

  2. centos在yum install报错:Another app is currently holding the yum lock解决方法

    centos在yum install报错:Another app is currently holding the yum lock解决方法 参考文章: (1)centos在yum install报错 ...

  3. phpmyadmin登录报错crypt_random_string requires at least one symmetric cipher be loaded 解决方法

    phpmyadmin登录报错crypt_random_string requires at least one symmetric cipher be loaded 解决方法 参考文章: (1)php ...

  4. python的moviepy库 打包 报错: ‘moviepy.audio.fx.all‘ has no attribute ‘audio_fade 的解决办法

    本篇文章主要讲解python的moviepy库 打包 报错: 'moviepy.audio.fx.all' has no attribute 'audio_fade 的解决办法 日期:2022年3月9 ...

  5. oracle插入时间报错,Oracle 插入时间时 报错:ORA-01861: 文字与格式字符串不匹配 的解决办法...

    一.写sql的方式插入到Oracle中 往oracle中插入时间  '2007-12-28 10:07:24' 如果直接按照字符串方式,或者,直接使用to_date('2007-12-28 10:07 ...

  6. 控制台报错:java.lang.ClassNotFoundException: javax.xml.bind.JAXBException之解决方法

    控制台报错:java.lang.ClassNotFoundException: javax.xml.bind.JAXBException之解决方法 参考文章: (1)控制台报错:java.lang.C ...

  7. msfconsole启动失败并报错`not_after=‘: bignum too big to convert into `long‘的解决方法

    msfconsole启动失败并报错`not_after=': bignum too big to convert into `long'的解决方法 参考文章: (1)msfconsole启动失败并报错 ...

  8. Pycharm报错:AttributeError: ‘NoneType‘ object has no attribute ‘_gdal‘的解决办法

    Pycharm报错:AttributeError: 'NoneType' object has no attribute '_gdal'的解决办法 解决办法如下: pycharm找到settings ...

  9. SVN报错:can‘t open file db/txn-current-lock:permission denied 解决方法

    SVN报错:can't open file db/txn-current-lock:permission denied 解决方法 参考文章: (1)SVN报错:can't open file db/t ...

  10. mysql 1033_mysql报错1033 Incorrect information in file: ''''xxx.frm''''问题的解决方法(图)...

    这篇文章主要介绍了关于mysql报错1033 Incorrect information in file: 'xxx.frm'问题的解决方法,文中通过示例代码介绍的很详细,需要的朋友可以参考借鉴,下面 ...

最新文章

  1. php调用搜狗ocr接口,搜狗ocr识别接口
  2. 数据结构 --静态队列 讲解
  3. Python类的使用总结
  4. 使用windowManager实现音乐播放器(悬浮框)效果
  5. android视频播放器api,03.视频播放器Api说明
  6. vscode括号颜色插件_[VSCode插件推荐] Bracket Pair Colorizer: 为代码中的括号添上一抹亮色...
  7. 修改配置nginx,限制无良爬虫频率
  8. html汉字在ie11中乱码,你好 我电脑 IE11  网页下拉的键都变成的中文乱码 例如“马夬”“邢”之类的中文乱码...
  9. 使用Latex排版一篇IEEE Robotics and Automation Letters期刊文章
  10. pptx文件怎么打开(ppt兼容包下载)
  11. adb通过局域网连接手机
  12. 20159318 《网络攻防实践》第2周学习总结
  13. 关于应用RestHighLevelClient操作ElasticSearch出现“远程主机强迫关闭一个现有连接”的问题探究
  14. Android手机与PC端进行通信
  15. Vue如何使用video标签实现视频播放
  16. 本科生毕业论文设计-论文总体-论文格式-查重经历
  17. 什么是低格、高格、快格?
  18. 车站广播系统采用计算机,高铁站广播系统
  19. bat批处理之启动多个PC端微信
  20. 微信开放平台10分钟推送一次临时ticket

热门文章

  1. 我的世界服务器交易系统,我的世界交易系统有什么用 我的世界交易系统详解...
  2. 【Verilog 基础】阻塞赋值和非阻塞赋值的区别
  3. 生产BOM设置半成品几点参考
  4. HIT软件构造第五章第三节知识点总结
  5. 优动漫PAINT中实用的小功能——网点纸化
  6. 使徒行者2开机了,你还有期待吗?
  7. mate8 html5测试,华为Mate8 体验评测(对比Pro5)
  8. java中for循环执行顺序
  9. mysql使用强制索引
  10. java基础:JDK的安装及设置环境变量