getting message 21:59:18 DeprecationWarning: Second argument is deprecated. It is ignored and will be removed in future

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

getting message 21:59:18 DeprecationWarning: Second argument is deprecated. It is ignored and will be removed in future

Post by keithsloan52 »

Getting message 21:59:18 DeprecationWarning: Second argument is deprecated. It is ignored and will be removed in future versions. The default Python feature proxy is used for extension method overrides.

But no line number how can I track down the Deprecated call?

Code: Select all

OS: macOS 10.15
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: (HEAD detached at 0.19.1)
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.8
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: getting message 21:59:18 DeprecationWarning: Second argument is deprecated. It is ignored and will be removed in fu

Post by keithsloan52 »

openBrain wrote: Tue Apr 06, 2021 6:26 am Comes from 'addExtension' : https://forum.freecadweb.org/viewtopic.php?f=10&t=54370
But it gives the impression that it is Fixed in 0.19, I am seeing this in 0.19.1
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: getting message 21:59:18 DeprecationWarning: Second argument is deprecated. It is ignored and will be removed in fu

Post by openBrain »

There isn't really any 'fixed' or not. The call has changed so you pass only the first argument.
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: getting message 21:59:18 DeprecationWarning: Second argument is deprecated. It is ignored and will be removed in fu

Post by keithsloan52 »

Well I had some code that was working previously with

Code: Select all

obj.addExtension('App::OriginGroupExtensionPython', self)
Which I tried to change to

Code: Select all

obj.addExtension('App::GroupExtensionPython')
And I now get this error

Code: Select all

{'sclassname': 'N4Base9TypeErrorE', 'sErrMsg': 'ExtensionContainer::getExtension: No extension of given type available', 'sfile': '', 'iline': 0, 'sfunction': '', 'swhat': 'ExtensionContainer::getExtension: No extension of given type available', 'btranslatable': False, 'breported': True}
Post Reply