First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
2016-09-22 21:21:47 -0500 | received badge | ● Famous Question (source) |
2016-04-27 12:24:22 -0500 | received badge | ● Popular Question (source) |
2016-04-27 12:24:22 -0500 | received badge | ● Notable Question (source) |
2016-04-15 16:45:31 -0500 | asked a question | Problem with using xlrd together with PSSE I have written a simple Python script: " import xlrd, sys print(sys.path) print(sys.version) workbook = xlrd.open_workbook(r"C:\Users\u6804\Desktop\work\RAWgen\test.xlsx") sheet = workbook.sheetbyindex(2) test = sheet.cell_value(rowx=4, colx=4) print(test) " If I run this from within PyScripter, this works just fine. However, if I run exactly the same script inside PSSE, I get the error message: "ImportError: No module named expat; use SimpleXMLTreeBuilder instead" (line with command " xlrd.open_workbook") I tried many things, however, I couldn't figure out what the problem is. One thing I observed is that in PyScripter the Python version is "2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)]", while in PSSE the version is "2.7 (r27:82500, Feb 15 2011, 10:12:26) [MSC v.1600 32 bit (Intel)]", thus slightly different. I didn't figure out how I could change the used Python version in PSSE. The sys.path-Output seemed identical. Any answers/ideas are appreciated a lot. Thanks in advance. |