Hey Everybody,
i am working on a project, which i am developing with Python and PyQT4. I have stumbled upon a somewhat odd behaviour of the QFileDialog, that is not occuring when running the project within in my IDE (Eclipse).
The problem is that QFileDialog in ExistingFiles-mode does fail to return the list of selected files, when one of the file paths is containing a german umlaut (ä,ü,ö, etc.) The QFileDialog is not offering options or parameters to make it sensible regarding this scenario. Does anyone have any ideas of how to tackle this issue?
edit: my deployment scenario in which the error occurs is looking like the following. i am building an executable with Py2Exe and then make it distributable with Inno Setup. don't know if this may have been giving birth to the problem but the more info the better i think.
edit2: I don't have the exact code accessable until friday, but we're having an if-statement waiting for the dialog to compplete. like this:
fileDialog = QFileDialog(...)
if fileDialog.exec_():
# get the choosen files
fileNames = fileDialog.getSelectedFiles()
# test if if-statement is entered
print fileNames
# convert from QStringList to normal list of Strings
fileNames = list(map(lambda x: str(x), fileNames))
# to suffice as an example print each
for fileName in fileNames:
print fileName
The first print command does get executed the second doesn't. As if something in between is not willing to terminate and Python is handling the exception somehow quietly. The QFileDialog however is closing as supposed after choosing the files and clicking "Open" or double clicking a file.