Errors on startup

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Errors on startup

Post by chrisb »

Since the last version (must have been 0.19.192XX) but still existing I get an error on startup. Everything seems working, but I don't use the workbenches mentioned in the errors.

Code: Select all

During initialization the error "'ascii' codec can't decode byte 0xc3 in position 50: ordinal not in range(128)" occurred in /Users/cb/Desktop/FreeCAD.app/Contents/Resources/Mod/ReverseEngineering/InitGui.py
Please look into the log file for further information
During initialization the error "'ascii' codec can't decode byte 0xc3 in position 39: ordinal not in range(128)" occurred in /Users/cb/Desktop/FreeCAD.app/Contents/Resources/Mod/Robot/InitGui.py
Please look into the log file for further information
During initialization the error "'ascii' codec can't decode byte 0xc3 in position 38: ordinal not in range(128)" occurred in /Users/cb/Desktop/FreeCAD.app/Contents/Resources/Mod/Import/InitGui.py
Please look into the log file for further information
During initialization the error "'ascii' codec can't decode byte 0xc3 in position 42: ordinal not in range(128)" occurred in /Users/cb/Desktop/FreeCAD.app/Contents/Resources/Mod/Raytracing/InitGui.py
Please look into the log file for further information
OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19310 (Git)
Build type: Release
Branch: master
Hash: a3622ee49feb4391e3c1015f8922095e75af538f
Python version: 3.8.1
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/Germany (en_DE)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Syres
Veteran
Posts: 2899
Joined: Thu Aug 09, 2018 11:14 am

Re: Errors on startup

Post by Syres »

chrisb wrote: Mon Jan 20, 2020 10:23 pm

Code: Select all

During initialization the error "'ascii' codec can't decode byte 0xc3 in position 50: ordinal not in range(128)" occurred in /Users/cb/Desktop/FreeCAD.app/Contents/Resources/Mod/ReverseEngineering/InitGui.py
Please look into the log file for further information
During initialization the error "'ascii' codec can't decode byte 0xc3 in position 39: ordinal not in range(128)" occurred in /Users/cb/Desktop/FreeCAD.app/Contents/Resources/Mod/Robot/InitGui.py
Please look into the log file for further information
During initialization the error "'ascii' codec can't decode byte 0xc3 in position 38: ordinal not in range(128)" occurred in /Users/cb/Desktop/FreeCAD.app/Contents/Resources/Mod/Import/InitGui.py
Please look into the log file for further information
During initialization the error "'ascii' codec can't decode byte 0xc3 in position 42: ordinal not in range(128)" occurred in /Users/cb/Desktop/FreeCAD.app/Contents/Resources/Mod/Raytracing/InitGui.py
Please look into the log file for further information
This is a guess (as I can't replicate it) but try changing line two to nine of src\Mod\Raytracing\InitGui.py from:

Code: Select all

# (c) 2003 Jürgen Riegel
#
# Gathering all the information to start FreeCAD
# This is the second one of three init scripts, the third one
# runs when the gui is up

#***************************************************************************
#*   Copyright (c) 2002 Jürgen Riegel <juergen.riegel@web.de>             *
to (as taken from Part Wb):

Code: Select all

# (c) 2003 Juergen Riegel
#
# Gathering all the information to start FreeCAD
# This is the second one of three init scripts, the third one
# runs when the gui is up

#***************************************************************************
#*   (c) Juergen Riegel (juergen.riegel@web.de) 2002                       *
If the other three still error but the Raytracing one disappears then at least a fix can be implemented.
I know you're running a German installation and therefore should be able to handle Umlauts but that's the only thing I can suggest.
Syres
Veteran
Posts: 2899
Joined: Thu Aug 09, 2018 11:14 am

Re: Errors on startup

Post by Syres »

I wonder if Python 3.8.1 is the culprit in that it's being fussy even with comment lines, hence why I've never seen the errors as I'm still on Python 3.6.8??
User avatar
wandererfan
Veteran
Posts: 6317
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Errors on startup

Post by wandererfan »

chrisb wrote: Mon Jan 20, 2020 10:23 pm Since the last version (must have been 0.19.192XX) but still existing I get an error on startup. Everything seems working, but I don't use the workbenches mentioned in the errors.
Another guess:

Code: Select all

change this: 
        self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/ReverseEngineering/Resources/icons/
to this:
        self.__class__.Icon =  FreeCAD.getResourceDir().decode("utf-8", "replace") + "Mod/ReverseEngineering/Resources/icons/
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Errors on startup

Post by chrisb »

Syres wrote: Tue Jan 21, 2020 9:36 am This is a guess (as I can't replicate it) but try changing line two to nine of src\Mod\Raytracing\InitGui.py from:
I changed the file, but all same errors still occur.

Edit: will check the other suggestions.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Errors on startup

Post by chrisb »

Sorry, I had made a mistake by changing "Jürgen" in Init.py instead of InitGUI.py. Now I have corrected it and it works.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Errors on startup

Post by chrisb »

wandererfan wrote: Tue Jan 21, 2020 12:34 pm

Code: Select all

change this: 
        self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/ReverseEngineering/Resources/icons/
to this:
        self.__class__.Icon =  FreeCAD.getResourceDir().decode("utf-8", "replace") + "Mod/ReverseEngineering/Resources/icons/
This did not work.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Errors on startup

Post by wmayer »

What happens when you add

Code: Select all

# -*- coding: utf-8 -*-
at the top of the files?

This is needed when using Py2 but the default codec for Py3 is utf-8 and I wonder why it specifically fails on your system, then.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: Errors on startup

Post by chrisb »

Adding a first line ...

Code: Select all

# -*- coding: utf-8 -*-
... didn't help either.

I could change the umlauts, but I have the very strong feeling that this is only a poor workaround. What would be a proper solution?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Errors on startup

Post by vocx »

chrisb wrote: Tue Jan 21, 2020 1:24 pm What would be a proper solution?
There shouldn't be a need for a solution. Python 3 should have no problem handling the umlauts at all.

Maybe it's a problem with Python 3.8 itself? Is there a way for you to update Python 3 in your system?
Last edited by vocx on Wed Jan 22, 2020 3:50 am, edited 1 time in total.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Post Reply