Porting to python3

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Porting to python3

Post by saso »

Some of the other files that build the start page are in \data\Mod\Start\StartPage

But I am also not able to load a translation of the start page, for example if I set the language to Slovenian I get

Code: Select all

("(unicode error) 'utf-8' codec can't decode byte 0xe8 in position 2: invalid continuation byte", ('<string>', 6, 46, None))
RogerK
Posts: 28
Joined: Thu Oct 04, 2018 6:25 pm
Location: Elsau

Re: Porting to python3

Post by RogerK »

saso wrote: Sat Jan 12, 2019 12:44 pm Some of the other files that build the start page are in \data\Mod\Start\StartPage

But I am also not able to load a translation of the start page, for example if I set the language to Slovenian I get

Code: Select all

("(unicode error) 'utf-8' codec can't decode byte 0xe8 in position 2: invalid continuation byte", ('<string>', 6, 46, None))
I have tested this on my machine. I don't have any Problem to switch translation with the latest build, there is no error printed out. I also tried to switch to Slovenian (at least I think I have choosen this language ;) )

Regarding the Image Issue of the StartPage. I think we should continue this on the original thread https://forum.freecadweb.org/viewtopic. ... 98#p279598 as this looks not like a python 3 issue anymore. I have added there another modification which now also solves the documentation icons.
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Porting to python3

Post by saso »

RogerK wrote: Sun Jan 13, 2019 9:11 am I have tested this on my machine. I don't have any Problem to switch translation with the latest build, there is no error printed out.
You have to restart FreeCAD or close the start page, switch to another WB (for example Sketcher) and back to Start WB. The error is shown in the Report View. I have tested and see this problem with several languages.
RogerK
Posts: 28
Joined: Thu Oct 04, 2018 6:25 pm
Location: Elsau

Re: Porting to python3

Post by RogerK »

saso wrote: Sun Jan 13, 2019 9:57 am You have to restart FreeCAD or close the start page, switch to another WB (for example Sketcher) and back to Start WB. The error is shown in the Report View. I have tested and see this problem with several languages.
I hav tried it again. I changed the language to Slovencina and then restarted FreeCAD and switched between different workbenches and the Start workbench multiple times, but I never get this messages in the report view nor in the python console. I tried the same for German, but no message either.

I used this version of FreeCad for testing (Conda Image):
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15619 (Git)
Build type: Release
Branch: master
Hash: 7d8e5662648b794b5c93e28835a2bf5c1fddffec
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Switzerland (de_CH)
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: Porting to python3

Post by Syres »

Firstly I'm not expecting this to be fixed, as it's a pretty specific hardware combination but maybe worth noting in Known Problems as there maybe a few new users with a similar setup.

I use a Huion 610 tablet only in Blender and Krita to reduce RSI on my right index finger but I have no use for it in FreeCAD and that's not a criticism. No matter whether the tablet is on and responsive or fully disconnected I get a APPCRASH specifically on exit of FreeCAD only with the Py3Qt5 version of the same build, see below.

I ran the debugging function and attach the log file but not sure if it's of any use.


I'm still trying to determine whether certain actions/methods (can't think of a better word) such as Unions, XORs produce a more repetitive crash on exit than Cuts, Slices etc. And yes I'm still a heretic for using the Part WB rather than PD but it works for me.

Code: Select all

Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	FreeCAD.exe
  Application Version:	0.0.0.0
  Application Timestamp:	5c37be20
  Fault Module Name:	wintab32.dll
  Fault Module Version:	1.0.0.1
  Fault Module Timestamp:	58f5d720
  Exception Code:	c0000005
  Exception Offset:	00000000000073af
  OS Version:	6.1.7601.2.1.0.256.48
  Locale ID:	2057
  Additional Information 1:	22a7
  Additional Information 2:	22a79a3edde1d60a457229c0720ffd03
  Additional Information 3:	e7b6
  Additional Information 4:	e7b6c31f343ac2bb8299ec08b615acbe

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt

APPCRASH reported using:

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15611 (Git)
Build type: Release
Branch: master
Hash: 64a94ae0f7c60fc981086fe157150a9c0dca29c6
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)



No APPCRASH reported using:

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15611 (Git)
Build type: Release
Branch: master
Hash: 64a94ae0f7c60fc981086fe157150a9c0dca29c6
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedKingdom (en_GB)
Attachments
FreeCAD.log
(24.26 KiB) Downloaded 74 times
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Porting to python3

Post by saso »

saso wrote: Sat Jan 12, 2019 12:44 pm But I am also not able to load a translation of the start page, for example if I set the language to Slovenian I get

Code: Select all

("(unicode error) 'utf-8' codec can't decode byte 0xe8 in position 2: invalid continuation byte", ('<string>', 6, 46, None))
About this error I have found this as a possible solution https://stackoverflow.com/questions/124 ... -byte-0x9c

But I don't quite know where in our code I should do this change to test if it works :?
User avatar
bitacovir
Veteran
Posts: 1570
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Porting to python3

Post by bitacovir »

I found some errors with this FreeCAD Conda version and some Workbenches when I run the program. These workbenches do not work in this FreeCAD version.

Code: Select all

During initialization the error invalid syntax (dimensioning.py, line 53) occurred in C:\Users\Rafael\AppData\Roaming\FreeCAD\Mod\drawing_dimensioning\InitGui.py
Please look into the log file for further information
During initialization the error invalid character in identifier (<string>, line 1) occurred in C:\Users\Rafael\AppData\Roaming\FreeCAD\Mod\fasteners\InitGui.py
Please look into the log file for further information
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.15656 (Git)
Build type: Release
Branch: master
Hash: a60b6957db228c42a00a1e002a415cbb8309d3c8
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

Canal Youtube Grupo Telegram de FreeCAD Español

My personal web site
My GitHub repository
Mini Airflow Tunnel Project
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Porting to python3

Post by yorik »

Fasteners works OK for me with python3... Can you try reinstalling it?
drawing_dimensioning indeed is not ported to py3, and probably never will be..
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Porting to python3

Post by Kunda1 »

yorik wrote: Mon Jan 21, 2019 12:36 pm drawing_dimensioning indeed is not ported to py3, and probably never will be..
Maybe the addon-manager should give a warning or prompt when downloading WBs that are not py3 compatible or v0.18 compatible ?
Examples of workbenches effected would be: GD&T, Timber, Workfeature etc...

Edit: basically any WB tracked in https://github.com/FreeCAD/FreeCAD-addons/issues/93 that isn't in progress
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
bitacovir
Veteran
Posts: 1570
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Porting to python3

Post by bitacovir »

yorik wrote: Mon Jan 21, 2019 12:36 pm Fasteners works OK for me with python3... Can you try reinstalling it?
Yes. I reinstalled it and now the message with error of Fasteners has gone.

But now I have this message:

Code: Select all

During initialization the error "'BIMWorkbench' already exists." occurred in C:\Users\Rafael\AppData\Roaming\FreeCAD\Mod\BIM.bak\InitGui.py
Please look into the log file for further informatio
n
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

Canal Youtube Grupo Telegram de FreeCAD Español

My personal web site
My GitHub repository
Mini Airflow Tunnel Project
Post Reply