Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

DeprecationWarning: 'warn'

MichaelT_123
Advisor

DeprecationWarning: 'warn'

MichaelT_123
Advisor
Advisor

R:/Lib64/Release_Build/Core/Neutron/Server/Base/pylibtemp/adsk\dls\streamer\manifests.py:796: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead

MichaelT
0 Likes
Reply
499 Views
10 Replies
Replies (10)

BrianEkins
Mentor
Mentor

Where did you see this?

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes

MichaelT_123
Advisor
Advisor

... on my computer running the F360 script in VSCode.

What is "interesting" ... the "R:" drive indicates a call to the remote server.

???

MichaelT
0 Likes

MichaelT_123
Advisor
Advisor

Hi Mr Ekins,

... and some other warnings ... under PythonVersion  -  3.12.4, releaselevel=final, serial=0

 

R:/Lib64/Release_Build/Core/Neutron/Server/Base/pylibtemp/adsk\dls\streamer\manifests.py:834: ResourceWarning: unclosed file <_io.TextIOWrapper name='C:\\Users\\MichaelT\\AppData\\Local\\Autodesk\\webdeploy\\production\\c4a5520f9bb0f0174c02662af8bd1ab67cee6298\\resources\\buildinfo.json' mode='r' encoding='cp1252'>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
R:/Lib64/Release_Build/Core/Neutron/Server/Base/pylibtemp/adsk\dls\streamer\analytics.py:32: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
 
This particular script itself ... produced desirable results ... but I have another one requiring quite heavy computing, which fails ... I believe due to active:
PYDEVD_TRACE in debugpy...(on the server side)  stemming from "Required Data Collection" and continues calls to the "R:/..." server constrained by environmental parameters like: 
                    "PYDEVD_THREAD_DUMP_ON_WARN_EVALUATION_TIMEOUT"
                    "PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT"
                    "PYDEVD_INTERRUPT_THREAD_TIMEOUT"
                    "PYDEVD_UNBLOCK_THREADS_TIMEOUT"
 
By my observation of running "an almost identical" piece of code inside and outside F360 environment, the difference in speed of its execution is very significant. I am also unsure, what is happening with the code "filtered" by the F360 side server, … in other words … what is the rationale behind doing so?.
 
Regards
MichaelT
MichaelT
0 Likes

BrianEkins
Mentor
Mentor

Where do you see this in VS Code? I'm running a simple script, and I'm not seeing anything in the VS Code output window or any of the other windows.

Regarding speed, I wouldn't expect any difference between running Python code in Fusion or outside. Fusion just passes the code the Python runtime delivered with Fusion to execute and doesn't do any "filtering".

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes

MichaelT_123
Advisor
Advisor

The messages are from the VSCode DEBUG CONSOLE window.

MichaelT
0 Likes

BrianEkins
Mentor
Mentor

I don't see it on my computer. Is it only when you run a specific script? Is anyone else seeing this?

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes

Jorge_Jaramillo
Collaborator
Collaborator

I'm not getting that error, but for me it is weird that installation directory I highlight in yellow in the below image:

 

Jorge_Jaramillo_0-1730573294194.png

It does not belong to any of the latest Fusion version.

Which Fusion version it belongs to?

 

0 Likes

MichaelT_123
Advisor
Advisor

Hi Messrs Jorge_Jaramillo, BrianEkins,

 

The Fusion version, as extracted from About dialogue box, is:

Fusion 2.0.20508 x86_64

 

The local referenced in the messages file:

'C:\\Users\\MichaelT\\AppData\\Local\\Autodesk\\webdeploy\\production\\c4a5520f9bb0f0174c02662af8bd1ab67cee6298\\resources\\buildinfo.json'

content is:

{

    "_comment": "Tracks information about this streamer build",

    "feature-version": "20240929144649"

}

 

Regarding "Is it only when you run a specific script?"

 

I have noticed "the phenomenon" recently. Only extensive computing code piece trigger "PYDEVD_***" events, and others of a similar kind ... pass through ... but slowly. The code is not unusual nor too exotic. (it runs outside F360 just fine).

The lighter ones might only issue lesser warnings like DeprecationWarning: 'warn' ... but also originate from the "R:*" server. 

 

Regards

MichaelT

MichaelT
0 Likes

Jorge_Jaramillo
Collaborator
Collaborator
Perhaps, you have the file :
C:\\Users\\MichaelT\\AppData\\Local\\Autodesk\\webdeploy\\production\\c4a5520f9bb0f0174c02662af8bd1ab67cee6298\\fusion_version.txt
If so, what it contains?
0 Likes

MichaelT_123
Advisor
Advisor

fusion_version.txt file content seems to be consistent with what About Box states.

2.0.20508

MichaelT
0 Likes