[英]OSError: [WinError 193] %1 is not a valid Win32 application in python
I am trying to run this code.我正在尝试运行此代码。 I have added the transactions.xlsx to the project.
我已将transactions.xlsx 添加到项目中。 I am getting this error
我收到此错误
OSError: [WinError 193] %1 is not a valid Win32 application.
OSError: [WinError 193] %1 不是有效的 Win32 应用程序。
I've checked some older posts and it is mentioned that this might have to do with my PyCharm being 64bits.我检查了一些较旧的帖子,有人提到这可能与我的 PyCharm 是 64 位有关。 I did install openpyxl and it is in my external libraries.
我确实安装了 openpyxl,它在我的外部库中。 Any hints will be greatly appreciated.
任何提示将不胜感激。 I am really new to Python.
我对 Python 真的很陌生。
import openpyxl as xlm
wb = xlm.load_workbook('transactions.xlsx')
sheet = wb['Sheet1']
cell = sheet['a1']
cell = sheet.cell(1, 1)
print(cell.value)
I am not sure what was causing the issue.我不确定是什么导致了这个问题。 What I did was uninstall PyCharm and reinstalled it.
我所做的是卸载 PyCharm 并重新安装它。 Issue was solved.
问题解决了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.