qkitgroup / qkit

Qkit framework
GNU General Public License v2.0
43 stars 46 forks source link

string-escape encoding throws error #41

Closed fr34q closed 6 years ago

fr34q commented 6 years ago

Just as a reminder/for documentation:

qkit/gui/plot/plot.py, line 35: cmd.append(h5_filepath.encode("string-escape")) #raw string encoding throws an error (for some unknown constellations)

Removing .encode("string-escape") fixes the problem. -> Should be removed everywhere if not necessary

Schneider1 commented 6 years ago

Please also refer to Issue #24 in this context. What kind of error occurs? One known problem is that the h5_filepath sometimes returns an unicode string which .encode can't handle. So if it's a TypeError: escape_encode() argument 1 must be string, not unicode, you have the reason.

Nevertheless we should check what happens if the filname contains a space,quote,..., if we just should prohibit using such filenames and if we still need the string-escape