Problem with using xlrd together with PSSE

asked 2016-04-15 16:45:31 -0600

anonymous user

Anonymous

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.

edit retag flag offensive close merge delete