我正在尝试创建一个脚本,它将接受用户信息并用信息填充word模板。在
我一直收到以下错误,我不明白为什么:TypeError: merge() argument after ** must be a mapping, not str
我的脚本首先从用户那里收集信息并将其存储到字典中。然后执行以下代码:
^{pr2}$
当我试图执行第二行stress_notes_document.merge(..)时,会发生错误。我正试图将字典中的值赋给word文档中的mergefield。在
有什么建议吗?在
以下是完整的错误:Traceback (most recent call last):
File "", line 1, in
runfile('C:/Python_All/python_scripts/data_gather.py', wdir='C:/Python_All/python_scripts')
File "C:\Python_All\Anaconda\lib\site-packages\spyder\utils\site\sitecustomize.py", line 710, in runfile
execfile(filename, namespace)
File "C:\Python_All\Anaconda\lib\site-packages\spyder\utils\site\sitecustomize.py", line 101, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Python_All/python_scripts/data_ga