ThreadKeeper icon indicating copy to clipboard operation
ThreadKeeper copied to clipboard

Macinstallation

Open P2meter opened this issue 5 months ago • 12 comments

Hi trying install the Threadkeeper get this: error: 'NoneType' object has no attribute 'group'

Copy this message by taking a screenshot. Describe what you did to get this error or record a video.


Fusion 360 v. 2602.1.25 /Users//Library/Application Support/Autodesk/ApplicationPlugins/ThreadKeeper.bundle/Contents/ThreadKeeper.py failed:

Traceback (most recent call last): File "/Users//Library/Application Support/Autodesk/ApplicationPlugins/ThreadKeeper.bundle/Contents/ThreadKeeper.py", line 103, in run fusion_deploy_folder = pathlib.Path(thomasa88lib.utils.get_fusion_deploy_folder()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users//Library/Application Support/Autodesk/ApplicationPlugins/ThreadKeeper.bundle/Contents/thomasa88lib/utils.py", line 53, in get_fusion_deploy_folder return _DEPLOY_FOLDER_PATTERN.match(get_fusion_ui_resource_folder()).group(0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'group'

Running Sonoma 14.7.6 and [Fusion 2602.1.25 x86_64 [Native] Any clues Peter

P2meter avatar Jul 28 '25 16:07 P2meter

Hi, this might have been an unintended side-effect of the change to use a new Mac path in ThreadKeeper 1.2.2 as part of issue #7 . I see that I did start working on a version 1.2.3 that would try both paths, but I did not complete that.

What is the threads path on your computer? Is it a), b) or something different?

/Users/<user>/Library/Application Support/Autodesk/webdeploy/production/<letters and numbers> (sorting by creation date might help finding the latest one)

a) Autodesk Fusion 360.app/Contents/Libraries/Applications/Fusion/Fusion/Server/Fusion/Configuration/ThreadData

b) Autodesk Fusion.app/Contents/Libraries/Applications/Fusion/Fusion/Server/Fusion/Configuration/ThreadData

thomasa88 avatar Aug 02 '25 09:08 thomasa88

Sorry but I can't even find the directory webdeploy/production under Users/xxx/Library/Application Support/Autodesk/webdeploy/production.

P2meter avatar Aug 25 '25 15:08 P2meter

I reinstalled Fusion and did get the webdeploy folder this time. The path is b): Autodesk Fusion.app/Contents/Libraries/Applications/Fusion/Fusion/Server/Fusion/Configuration/ThreadData

P2meter avatar Aug 26 '25 12:08 P2meter

Did this solve the error or is it still showing up?

If it is still a problem, please open the text console (File -> View -> Show Text Commands), select Py at the bottom and enter:

app=adsk.core.Application.get()

app.userInterface.workspaces.itemById('FusionSolidEnvironment').resourceFolder

What is the output?

thomasa88 avatar Sep 14 '25 08:09 thomasa88

This came up: /Applications/Autodesk Fusion.app/Contents/Libraries/Applications/Fusion/Fusion/UI/FusionUI/Resources/Environment/Model

P2meter avatar Sep 15 '25 08:09 P2meter

I see. hmm. The add-in expected that value to be something like

/Users/<user>/Library/Application Support/Autodesk/webdeploy/production/<hash>/Autodesk Fusion 360.app/Contents/Libraries/Applications/Fusion/Fusion/UI/FusionUI/Resources/Environment/Model.

So it seems that the thread data and the installation location differs in this case. 🤔 How bothersome.

So this is the full path to your ThreadData folder, below?

/Users/<user>/Library/Application Support/Autodesk/webdeploy/production/<letters and numbers>/Autodesk Fusion.app/Contents/Libraries/Applications/Fusion/Fusion/Server/Fusion/Configuration/ThreadData

If so, can you run this command? It will print some Fusion folder paths. There should be a copy button if you hover your mouse over the code box.

app=adsk.core.Application.get();import getpass; paths=['appLogFilePath','appStoreInstallPath','defaultPathForScriptsAndAddIns','materialsPath','optionsPath','rootPath','userDataPath'];print('\n'.join([p + ': ' + getattr(app.applicationFolders, p).replace(app.currentUser.userId, '<user_id>').replace(getpass.getuser(),'<user>') for p in paths]))

thomasa88 avatar Sep 16 '25 06:09 thomasa88

Hi Thanks the path is as you wrote:

/Users/<User>/Library/Application Support/Autodesk/webdeploy/production/numbers123456/Autodesk Fusion.app/Contents/Libraries/Applications/Fusion/Fusion/Server/Fusion/Configuration/ThreadData

The result of the path script is: appLogFilePath: /Users//Library/Application Support/Autodesk/Autodesk Fusion 360/<user_id>/logs/AppLogFile20250916T104107.log appStoreInstallPath: /Users//Library/Application Support/Autodesk/ApplicationPlugins defaultPathForScriptsAndAddIns: /Users//Library/Application Support/Autodesk/Autodesk Fusion 360/API/ materialsPath: /Users//Library/Application Support/Autodesk/Autodesk Fusion 360/Materials optionsPath: /Users//Library/Application Support/Autodesk/Neutron Platform/Options/<user_id> rootPath: /Applications userDataPath: /Users//Library/Application Support/Autodesk/Autodesk Fusion 360/<user_id>

Thanks P2

P2meter avatar Sep 16 '25 08:09 P2meter

Thanks for the info. Annoyingly, none of those paths contain webdeploy/production/<numbers and letters>, where the ThreadData folder is located 🤔

I think you used another installation method of Fusion than what I used when I ported the add-in to a Mac.

Can you try this instead:

  • File -> View -> Show Text Commands
  • Select Py.
  • Write the below command and post the result:
import json; paths = json.loads(app.executeTextCommand("paths.get"));print('\n'.join( [f"{k}: {v}" for (k,v) in paths.items()]).replace(app.currentUser.userId, 'USER_ID').replace(getpass.getuser(),'USER'))

thomasa88 avatar Sep 16 '25 17:09 thomasa88

Here you go:

rootDirectory: /Applications/Autodesk Fusion.app/Contents/Libraries/Neutron/ executableDirectory: /Applications/ localizationDirectory: /Applications/Autodesk Fusion.app/Contents/Libraries/Neutron/ coreAddInDirectory: /Applications/Autodesk Fusion.app/Contents/Libraries/Neutron/ stringTableDirectory: /Applications/Autodesk Fusion.app/Contents/Libraries/Neutron/StringTable/ appDirectory: /Applications/Autodesk Fusion.app/Contents/Libraries/Applications/ sharedExtensionDirectory: /Applications/Autodesk Fusion.app/Contents/Libraries/Neutron/SharedExtensions/ temporaryDirectory: /var/folders/3t/7qzm3sgs0_g_1x27kzsl63900000gq/T/Neutron/ unbrandedUserDataDirectory: /Users/USER/Library/Application Support/Autodesk/Neutron Platform/ userDataDirectory: /Users/USER/Library/Application Support/Autodesk/Autodesk Fusion 360/USER_ID/ unbrandedUserAppPluginsDirectory: /Users/USER/Library/Application Support/Autodesk/ApplicationPlugins/ bootstrapOptionDirectory: /Users/USER/Library/Application Support/Autodesk/Neutron Platform/Options/ optionsDirectory: /Users/USER/Library/Application Support/Autodesk/Neutron Platform/Options/USER_ID/ cloudCacheDirectory: /Users/USER/Library/Application Support/Autodesk/Autodesk Fusion 360/USER_ID/ isInstalledBuild: True scriptsDirectory: /Users/USER/Library/Application Support/Autodesk/Autodesk Fusion 360/MyScripts/ autorunScriptsDirectory: /Users/USER/Library/Application Support/Autodesk/Autodesk Fusion 360/MyScripts/Autorun/ samplesScriptsDirectory: /Users/USER/Library/Application Support/Autodesk/Autodesk Fusion 360/MyScripts/Samples/ programDataScriptsDirectory: /Users/USER/Library/Application Support/Autodesk/Autodesk Fusion 360/MyScripts/ProgramData/ appDataScriptsDirectory: /Users/USER/Library/Application Support/Autodesk/Autodesk Fusion 360/MyScripts/AppData/ manuallyInstalledScriptsDirectory: /Users/USER/Library/Application Support/Autodesk/Autodesk Fusion 360/MyScripts/ManuallyInstalled/ frameworksDirectory: /Applications/Frameworks neutronFrameworksDirectory: /Applications/Frameworks/Neutron airMAXFrameworksDirectory: /Applications/Autodesk Fusion.app/Contents/Libraries/AIRMAX materialsDirectory: /Users/USER/Library/Application Support/Autodesk/Autodesk Fusion 360/Materials/ testTempDirectory: /var/folders/3t/7qzm3sgs0_g_1x27kzsl63900000gq/T/Neutron/Test/ scratchDirectory: /var/folders/3t/7qzm3sgs0_g_1x27kzsl63900000gq/T/Neutron/Test/Scratch/Test_98034/ resultDirectory: /Applications/Libraries/Neutron/Result/ sampleDirectory: /Applications/Libraries/Neutron/Neutron/Test/Sample/ AppLogFilePath: /Users/USER/Library/Application Support/Autodesk/Autodesk Fusion 360/USER_ID/logs/AppLogFile20250916T104107.log CacheDirectory: /Users/USER/Library/Application Support/Autodesk/Autodesk Fusion 360/USER_ID/W autoSaveDirectory: Auto-save location is /Users/USER/Library/Application Support/Autodesk/Autodesk Fusion 360/USER_ID/CrashRecovery

Thanks P

P2meter avatar Sep 17 '25 07:09 P2meter

Hi, I think I may have a solution. Before I change the add-in code, would you mind trying the below code in the consale and see if it prints the path to the ThreadData folder in your Fusion installation:

import pathlib; import sys; print(str(pathlib.Path(sys.argv[0]).parent / 'Autodesk Fusion.app' / 'Contents' / 'Libraries' / 'Applications' / 'Fusion' / 'Fusion' / 'Server' / 'Fusion' / 'Configuration' / 'ThreadData'))

Thanks

thomasa88 avatar Sep 18 '25 18:09 thomasa88

Hi, input: import pathlib; import sys; print(str(pathlib.Path(sys.argv[0]).parent / 'Autodesk Fusion.app' / 'Contents' / 'Libraries' / 'Applications' / 'Fusion' / 'Fusion' / 'Server' / 'Fusion' / 'Configuration' / 'ThreadData'))

output: /Applications/Autodesk Fusion.app/Contents/MacOS/Autodesk Fusion.app/Contents/Libraries/Applications/Fusion/Fusion/Server/Fusion/Configuration/ThreadData

P2meter avatar Sep 19 '25 11:09 P2meter

Hmm, that did not work either.. :(

I have created a question on the Fusion add-in forums, but it might take a while to find a good answer. https://forums.autodesk.com/t5/fusion-api-and-scripts-forum/how-to-find-the-latest-the-threaddata-folder-on-all-platforms/td-p/13816650

Thanks for reporting the result.

thomasa88 avatar Sep 20 '25 16:09 thomasa88