Just installed latest FreeCAD on Mac and get error message - related to Assembly3 I assume

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Locked
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Just installed latest FreeCAD on Mac and get error message - related to Assembly3 I assume

Post by keithsloan52 »

I just updated my system with FreeCAD_0.19-22611-macOS-x86_64-conda.dmg

When FreeCAD starts up I get the following error message

Code: Select all

19:19:08  Init: Initializing freecad.asm3
19:19:08  Module: Part
19:19:09  Loading Part module... done
19:19:13  /Applications/FreeCAD_0.19-B.app/Contents/Resources/lib/python3.8/site-packages/mpmath/ctx_mp_python.py:892: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if other is 0:
19:19:13  /Applications/FreeCAD_0.19-B.app/Contents/Resources/lib/python3.8/site-packages/mpmath/ctx_mp_python.py:986: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if other is 0:
19:19:13  Init: Initializing freecad.asm3... done
chrisb
Veteran
Posts: 54302
Joined: Tue Mar 17, 2015 9:14 am

Re: Just installed latest FreeCAD on Mac and get error message - related to Assembly3 I assume

Post by chrisb »

Known issue in a third party lib.
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: Just installed latest FreeCAD on Mac and get error message - related to Assembly3 I assume

Post by vocx »

keithsloan52 wrote: Thu Oct 08, 2020 6:35 pm ...
When FreeCAD starts up I get the following error message
This is not an error message, it is a warning, as said in the message itself.

It is due to the mpmath mathematical library included with Python 3.8. This is not caused by FreeCAD in any way.

Once the mpmath authors fix the syntax in their file, this message will go away.

SyntaxWarning
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.
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: Just installed latest FreeCAD on Mac and get error message - related to Assembly3 I assume

Post by keithsloan52 »

vocx wrote: Thu Oct 08, 2020 8:38 pm
keithsloan52 wrote: Thu Oct 08, 2020 6:35 pm ...
When FreeCAD starts up I get the following error message
This is not an error message, it is a warning, as said in the message itself.

It is due to the mpmath mathematical library included with Python 3.8. This is not caused by FreeCAD in any way.

Once the mpmath authors fix the syntax in their file, this message will go away.

SyntaxWarning
Yes it does say SyntaxWarning: "is" with a literal. Did you mean "=="?

But this is Python is it not.

I know my Python is not great, but surely if you use is 'x' where 'x' is a literal then you are not going to get your expected behaviour,
i.e. Its a bug in mpmath and would affect Assemble3 Workbench
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Just installed latest FreeCAD on Mac and get error message - related to Assembly3 I assume

Post by Kunda1 »

Kunda1 wrote: Thu Oct 08, 2020 10:50 am
When you compare an object to None, use is rather than ==. None is a singleton object, comparing using == invokes the __eq__ method on the object in question, which may be slower than identity comparison. Comparing to None using the is operator is also easier for other programmers to read.
Source: https://lgtm.com/rules/7900090/
It's been fixed upstream so I guess we're waiting for an upstream release?
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
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Just installed latest FreeCAD on Mac and get error message - related to Assembly3 I assume

Post by sgrogan »

keithsloan52 wrote: Thu Oct 08, 2020 9:31 pm But this is Python is it not.
Please let's consolidate here: https://forum.freecadweb.org/viewtopic.php?f=4&t=50942
"fight the good fight"
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Just installed latest FreeCAD on Mac and get error message - related to Assembly3 I assume

Post by Kunda1 »

sgrogan wrote: Thu Oct 08, 2020 9:57 pm Please let's consolidate here: https://forum.freecadweb.org/viewtopic.php?f=4&t=50942
This thread is locked in favor of https://forum.freecadweb.org/viewtopic.php?f=4&t=50942
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
Locked