View Issue Details

IDProjectCategoryView StatusLast Update
0003105FreeCADBugpublic2017-06-28 14:37
ReportersadskullAssigned Toyorik 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.17 
Target VersionFixed in Version0.17 
Summary0003105: Arch fails to load with 'ascii' codec can't decode byte 0xc2 in position 22: ordinal not in range(128)
DescriptionWhen loading the Arch workbench, the following error message appears in a window titled "Defective workbench":
Error wrote

'ascii' codec can't decode byte 0xc2 in position 22: ordinal not in range(128)"


The python console displays:
'ascii' codec can't decode byte 0xc2 in position 22: ordinal not in range(128)
Traceback (most recent call last):
  File "<string>", line 32, in Initialize
  File "/usr/lib/freecad-daily/Mod/Draft/DraftTools.py", line 45, in <module>
    from DraftGui import todo, QtCore, QtGui, translate, utf8_decode
  File "/usr/lib/freecad-daily/Mod/Draft/DraftGui.py", line 2141, in <module>
    FreeCADGui.draftToolBar = DraftToolBar()
  File "/usr/lib/freecad-daily/Mod/Draft/DraftGui.py", line 304, in __init__
    self.setupTray()
  File "/usr/lib/freecad-daily/Mod/Draft/DraftGui.py", line 650, in setupTray
    self.wplabel.setToolTip(translate("draft", "Current working plane:")+self.wplabel.text())



The error happens in French rather than in English.

Adding following code to file /usr/lib/freecad-daily/Mod/Draft/DraftTools.py after line 41 works around the issue:


reload(sys)
sys.setdefaultencoding('utf-8')

Steps To Reproduce1. Set FreeCAD language to French:
Edit -> Preferences -> General -> Language -> Français

2. Load Arch workbench
Additional InformationOS: Debian GNU/Linux 9.0 (stretch)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11432 (Git)
Build type: None
Branch: master
Hash: 0768ae99cfd6036601f66658f6e0f923de9af6f2
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
TagsArch, crash, GUI, linux, locale, python, Start Workbench

Activities

sadskull

2017-06-25 11:20

reporter  

Freecad.png (233,509 bytes)
Freecad.png (233,509 bytes)

Kunda1

2017-06-25 12:31

administrator   ~0009523

CC @normandc

normandc

2017-06-25 15:59

manager   ~0009528

Please write bug reports in English!!! Most people simply do not speak French. I have translated the report.

normandc

2017-06-25 16:01

manager   ~0009529

Last edited: 2017-06-25 16:01

View 2 revisions

Deleting external image link from report description since OP uploaded it.

normandc

2017-06-25 16:07

manager   ~0009530

Last edited: 2017-06-25 16:12

View 3 revisions

My system is suffering from the same bug. This is related to the Draft workbench failing to load.

See forum topic https://forum.freecadweb.org/viewtopic.php?f=4&t=23106

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11433 (Git)
Build type: Unknown
Branch: master
Hash: 3ada1416bad6518f3ee69bbcf7e11bbcbb2ff7ee
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0

normandc

2017-06-25 16:16

manager   ~0009531

As I wrote previously the real problem is caused by the Draft workbench failing to load. I'm not sure if I should create a separate bug report and link it to this one.

normandc

2017-06-25 16:25

manager   ~0009532

I tested the following accented languages:
Čeština
Português do Brasil
Español de España
Slovenčina

So far only French is affected by the issue.

yorik

2017-06-26 13:58

administrator   ~0009539

This should be fixed with commit 3ada1416bad65

normandc

2017-06-26 14:10

manager   ~0009544

As per my comment https://freecadweb.org/tracker/view.php?id=3105#c9530

commit 3ada1416 does not fix the issue.

Kunda1

2017-06-27 11:40

administrator   ~0009560

@sadskull please test fix on latest v0.17 revision. Thanks!

sadskull

2017-06-27 12:14

reporter   ~0009561

Hi @Kunda1

revision 11455, always the same issue.

Kunda1

2017-06-27 12:59

administrator   ~0009562

Does revision 11455 include git commit 3ada1416 ?

normandc

2017-06-28 03:42

manager   ~0009567

You need to test with revision 11456 or later.

Commit 859b94e is the one that fixes the issue for me.

Tested on
OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11457 (Git)
Build type: Unknown
Branch: master
Hash: b41624590d4b2d734588456655fa7fb30f9dac15
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0



https://github.com/FreeCAD/FreeCAD/commit/859b94e311e5e62d44e712115b2351bf655aa0ce

Kunda1 wrote

Does revision 11455 include git commit 3ada1416 ?

3ada1416 was revision 11433, it's old news, please read my two previous comments.

sadskull

2017-06-28 14:33

reporter   ~0009579

Hi

Yep, it's fixe the issue for me too.

Kunda1

2017-06-28 14:36

administrator   ~0009580

Last edited: 2017-06-28 14:37

View 2 revisions

Great! Thanks to all involved.
Fix by yorik in FreeCAD master 859b94e3

Issue History

Date Modified Username Field Change
2017-06-25 11:12 sadskull New Issue
2017-06-25 11:12 sadskull Tag Attached: Arch
2017-06-25 11:12 sadskull Tag Attached: crash
2017-06-25 11:12 sadskull Tag Attached: GUI
2017-06-25 11:12 sadskull Tag Attached: linux
2017-06-25 11:12 sadskull Tag Attached: python
2017-06-25 11:12 sadskull Tag Attached: Start Workbench
2017-06-25 11:20 sadskull File Added: Freecad.png
2017-06-25 12:31 Kunda1 Description Updated View Revisions
2017-06-25 12:31 Kunda1 Note Added: 0009523
2017-06-25 12:32 Kunda1 Assigned To => normandc
2017-06-25 12:32 Kunda1 Status new => assigned
2017-06-25 15:59 normandc Assigned To normandc =>
2017-06-25 15:59 normandc Summary 'ascii' codec can't decode byte 0xc2 in position 22: ordinal not in range(128) => Arch fails to load with 'ascii' codec can't decode byte 0xc2 in position 22: ordinal not in range(128)
2017-06-25 15:59 normandc Description Updated View Revisions
2017-06-25 15:59 normandc Steps to Reproduce Updated View Revisions
2017-06-25 15:59 normandc Note Added: 0009528
2017-06-25 16:01 normandc Description Updated View Revisions
2017-06-25 16:01 normandc Note Added: 0009529
2017-06-25 16:01 normandc Note Edited: 0009529 View Revisions
2017-06-25 16:07 normandc Note Added: 0009530
2017-06-25 16:08 normandc Assigned To => yorik
2017-06-25 16:08 normandc Status assigned => confirmed
2017-06-25 16:09 normandc Note Edited: 0009530 View Revisions
2017-06-25 16:12 normandc Note Edited: 0009530 View Revisions
2017-06-25 16:16 normandc Note Added: 0009531
2017-06-25 16:25 normandc Note Added: 0009532
2017-06-26 13:25 Kunda1 Tag Attached: locale
2017-06-26 13:58 yorik Note Added: 0009539
2017-06-26 14:10 normandc Note Added: 0009544
2017-06-27 11:40 Kunda1 Status confirmed => feedback
2017-06-27 11:40 Kunda1 Note Added: 0009560
2017-06-27 12:14 sadskull Note Added: 0009561
2017-06-27 12:14 sadskull Status feedback => assigned
2017-06-27 12:59 Kunda1 Note Added: 0009562
2017-06-28 03:42 normandc Note Added: 0009567
2017-06-28 12:25 Kunda1 Status assigned => feedback
2017-06-28 14:33 sadskull Note Added: 0009579
2017-06-28 14:33 sadskull Status feedback => assigned
2017-06-28 14:36 Kunda1 Status assigned => closed
2017-06-28 14:36 Kunda1 Resolution open => fixed
2017-06-28 14:36 Kunda1 Note Added: 0009580
2017-06-28 14:37 Kunda1 Fixed in Version => 0.17
2017-06-28 14:37 Kunda1 Note Edited: 0009580 View Revisions