简体   繁体   English

运行 xlwings 和 win32com.client 时出错

[英]error when running xlwings and win32com.client

I am habing trouble with xlwings and win32com.client, both xlwings and win32com.client have been working fine up until recently.我在使用 xlwings 和 win32com.client 时遇到了麻烦,直到最近 xlwings 和 win32com.client 都运行良好。 When i try to import xlwings for example.例如,当我尝试导入 xlwings 时。

import xlwings

I get an ERROR below:我在下面收到一个错误:

_pickle.UnpicklingError: invalid load key, '\x00' _pickle.UnpicklingError: 无效的加载键,'\x00'

I get a similar error when i run the code below: import win32com.client , but get no error when i run import win32com运行以下代码时出现类似错误: import win32com.client ,但运行import win32com时未出现错误

i have tried uninstalling python and reinstalling it again but the issue still persist and reloading the modules.我已尝试卸载 python 并重新安装它,但问题仍然存在并重新加载模块。

I managed to resolve the issue by just uninstalling python and re-installing it again.我设法通过卸载 python 并重新安装它来解决这个问题。 Then re-installing xlwings.然后重新安装 xlwings。 note that i am using python 3.7.请注意,我使用的是 python 3.7。

I resolved this issue uninstalling xlwings, erasing the content of this folder我解决了这个问题,卸载 xlwings,删除了这个文件夹的内容

C:\Users\YOUR_USERNAME\AppData\Local\Temp\gen_py\3.8 C:\Users\YOUR_USERNAME\AppData\Local\Temp\gen_py\3.8

and then reinstalling xlwings.然后重新安装 xlwings。

(Anaconda 3 Python 3.8). (Anaconda 3 Python 3.8)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM