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

Running WriteUserIfToFile causes an abort when accessing a specific workspace

epm
Contributor

Running WriteUserIfToFile causes an abort when accessing a specific workspace

epm
Contributor
Contributor

hi

 

when trying to run the sample script WriteUserIfToFile.py, an error is generated when the script tries to access the count field of the MSFNesting workspace ...

 

attached copies of the error messages generated, the first error is from a script unmodified. Then the script was modified to display the workspace.if of the next workspace being accessed ..


- latest code (i think updated yesterday automatically)

- win10 environment

 

regards

 

eric

traceback.pngname of failing workspace.png

 

 

0 Likes
Reply
Accepted solutions (1)
450 Views
6 Replies
Replies (6)

JeromeBriot
Mentor
Mentor

Hello,

 

I can reproduce the bug in the script: Write user interface to a file

 

The bug is in workspace.toolbarPanels.count at line 50

 

Replace this faulty line with a try-except statement:

            try:
                msg = '   ' + workspace.id + ' (' + str(workspace.toolbarPanels.count) + ')____\n'
            except:
                msg = '   ' + workspace.id + ' (????????????????????)____\n'

 

Here is the line in the created file:

MSFNesting (????????????????????)____

 

 

0 Likes

epm
Contributor
Contributor

hi

 

i realize for production code one uses try/catch ...

 

however:

 

1) this is sample code from the fusion documentation site

 

2) error seems to indicate some sort of internal error/corruption of an autodesk internal component... now is this if concern to anyone?? its easy enough to mask it ...

 

regards

 

eric

 

 

0 Likes

JeromeBriot
Mentor
Mentor

@goyals, I think you have to log this one in your bug tracking system.

0 Likes

epm
Contributor
Contributor

hi

 

 

woops... i thought this was it ...

 

where should i go to report it??

 

regards

 

eric

 

0 Likes

JeromeBriot
Mentor
Mentor

@epm wrote:

woops... i thought this was it ...

 

where should i go to report it??


You did it the right way. This forum is the best place to report API related bugs.

0 Likes

goyals
Autodesk
Autodesk
Accepted solution

This is known problem to us and We are working on fixing our samples provided in API documentation. Thanks.



Shyam Goyal
Sr. Software Dev. Manager
1 Like