QssStylesheetEditor icon indicating copy to clipboard operation
QssStylesheetEditor copied to clipboard

Crash on Save as

Open cnrdzn opened this issue 3 years ago • 1 comments

Windows 10 x64 (Turkish), Python 3.9

D:\Software\QssStylesheetEditor\src>app.py starting... config file "D:\Software\QssStylesheetEditor\src\i18n\list.toml" load successed! config file "D:\Software\QssStylesheetEditor\src\config\config.toml" load successed! Preimporting 'PyQt5.Qsci' ... successfully in 0.031s. Preimporting 'res' ... successfully in 0.016s. Preimporting 'res.img_rc' ... successfully in 0.016s. Preimporting 'ui' ... successfully in 0.12s. Preimporting 'qss_template' ... successfully in 0.047s. coding: GB2312 Editor syntax highlighting language: QSS D_Lib: debug printing for files [.] and level [100] is turned on D_Lib: debug printing for files [.] and level [200] is turned on D_Lib: debug printing for files [.*] and level [300] is turned on 23300:vf_shex.cpp(89): INFO: DllCanUnloadNow returned S_OK. Traceback (most recent call last): File "D:\Software\QssStylesheetEditor\src\ui\mainwin.py", line 391, in saveAs self.editor.save(self.file) File "C:\Python39\lib\site-packages\CodeEditor\editor.py", line 366, in save outfile.write(self.text()) File "C:\Python39\lib\encodings\cp1254.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode characters in position 491-495: character maps to

Fix \src\ui\mainwin.py Find & replace self.editor.save(self.file) to self.editor.save(self.file.encode("utf-8"))

cnrdzn avatar Feb 22 '21 05:02 cnrdzn

thanks, it will be fixed.

hustlei avatar Feb 24 '21 05:02 hustlei