pyfa-org / Pyfa

Python fitting assistant, cross-platform fitting tool for EVE Online
GNU General Public License v3.0
1.61k stars 406 forks source link

Right clicking on a Projected fit whose name contains Chinese character cause an error #1313

Closed player921 closed 6 years ago

player921 commented 6 years ago

OS version: Windows-8-6.2.9200 Python: 2.7.10 wxPython: 3.0.2.0 SQLAlchemy: 1.0.5 Logbook: 1.0.0 pyfa version: 1.32.0 Stable - YC119.9 1.3 pyfa root: C:\Program Files (x86)\pyfa save path: C:\Users\myusername.pyfa fs encoding: mbcs

EXCEPTION: 'ascii' codec can't encode characters in position 0-12: ordinal not in range(128)

File "C:\python-2.7.10\lib\site-packages\wx-3.0-msw\wx_core.py", line 16766, in File "C:\Program Files (x86)\pyfa\library.zip\gui\builtinAdditionPanes\projectedView.py", line 294, in spawnMenu menu = ContextMenu.getMenu((item,), *context) File "C:\Program Files (x86)\pyfa\library.zip\gui\contextMenu.py", line 73, in getMenu texts = m.getText(itemContext, selection) File "C:\Program Files (x86)\pyfa\library.zip\gui\builtinContextMenus\itemRemove.py", line 28, in getText return "Remove {0}".format(itmContext if itmContext is not None else "Item")

Detailed steps to reproduce: 1.Create any fit and name it in Chinese or any non-ascii characters, for example 啊啊啊啊. It doesn't need to contain anything. 2.Drag the fit into Additions->Projected in any fit. 3.Right click on it.

blitzmann commented 6 years ago

Thanks for the report, I can reproduce. Should have a fix shortly